这是我读取db文件的代码:
OleDbConnectionStringBuilder s = new OleDbConnectionStringBuilder();
s.Provider = "microsoft.Jet.Oledb.4.0";
s.DataSource = Dir;
s["Extended Properties"] = "Paradox 5.x";
OleDbConnection m_ParadoxConnection = new OleDbConnection(s.ConnectionString);
m_ParadoxConnection.Open();
OleDbDataAdapter da = new OleDbDataAdapter("select * from " + fileName, m_ParadoxConnection);
DataTable dt = new DataTable();
da.Fill(dt);
CreateExcel(dt, "DB数据读取并导出Excel");执行到da.Fill(dt)时,报外部表不是预期的格式,请大家帮帮忙奥 谢谢了奥
OleDbConnectionStringBuilder s = new OleDbConnectionStringBuilder();
s.Provider = "microsoft.Jet.Oledb.4.0";
s.DataSource = Dir;
s["Extended Properties"] = "Paradox 5.x";
OleDbConnection m_ParadoxConnection = new OleDbConnection(s.ConnectionString);
m_ParadoxConnection.Open();
OleDbDataAdapter da = new OleDbDataAdapter("select * from " + fileName, m_ParadoxConnection);
DataTable dt = new DataTable();
da.Fill(dt);
CreateExcel(dt, "DB数据读取并导出Excel");执行到da.Fill(dt)时,报外部表不是预期的格式,请大家帮帮忙奥 谢谢了奥
解决方案 »
- 我想获取本机硬盘码?但是在win7下面必须管理员才能显示!
- 关于如何使用CDO.dll来获取.eml邮件格式文件的附件
- .net 平台开发视频监控
- 怎样判断dll文件加载时的进度和状态
- ado执行一条sql语句是这样的:“rs.open str1, cn, ...”,请问在C#中利用ado.net如何执行一条SQL语句?
- vs2005 没有 windows服务
- DataGridView排序问题
- System.Runtime.InteropServices.ExternalException (0x80004005)
- C# DataGridView 如何设置列宽
- 请问:在WindowsApplication中如何使用DataGrid并将一个DataView绑定到DataGrid中
- C# SmWSImpl?wsdl文件应用
- HttpWebRequest 异步请求,为什么返回不正常呢。
http://connectionstrings.com/paradox
OleDbDataAdapter da = new OleDbDataAdapter("select * from " + fileName, m_ParadoxConnection);这是啥?
“Provider=Microsoft.Jet.OLEDB.4.0; Data Source=DbDir; Extended Properties=Paradox 5.x; Persist Security Info=False”注意:Data Source是目录!