.net连接VF数据库
时间:2010-08-18 来源:08信工实训
代码
System.Data.Odbc.OdbcConnection conn = new System.Data.Odbc.OdbcConnection();
string table = filename;
string connStr = @"Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=" + path + ";Exclusive=No;NULL=NO;Collate=Machine;BACKGROUNDFETCH=NO;DELETED=NO";
conn.ConnectionString = connStr;
conn.Open();
OdbcCommand cmd = new OdbcCommand();
cmd.Connection = conn;
string sql = "select * from T_tdd";
cmd.CommandText = sql;
cmd.CommandType = CommandType.Text;
相关阅读 更多 +