日期:2014-05-19  浏览次数:20846 次

求c#连接foxpro数据库dbf文件的代码
求c#连接foxpro数据库dbf文件的代码

------解决方案--------------------
string strDirectory;
strDirectory=textBox1.Text.Trim();
OdbcConnection myConn; //数据连接
OdbcDataAdapter myAdapter;//数据适配器

//数据库连接
string myStrConnection= "Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB= "+strDirectory+ "; ";

string myStrSelect= "SELECT * FROM "+strDirectory+ " ";
myConn = new OdbcConnection(myStrConnection);