.net连接VF数据库

作者:互联网   出处:控件中国网   2014-11-05 19:04:42   阅读:1

.net连接VF数据库

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;

 

Copyright© 2006-2015 ComponentCN.com all rights reserved.重庆磐岩科技有限公司(控件中国网) 版权所有 渝ICP备12000264号 法律顾问:元炳律师事务所
客服软件
live chat