数据库连接字符串 - dBase Dbf

2022-03-23 00:00:00 专区 订阅 付费 链接 原文

数据库连接字符串 - dBase Dbf

ODBC DSN

// ODBC DSN



using System.Data.Odbc;



OdbcConnection conn = new OdbcConnection();

conn.ConnectionString = "Dsn=DsnName";

conn.Open();



// Use: sql = "Select * From MyDb.dbf"





ODBC without DSN

// ODBC without DSN



using System.Data.Odbc;



OdbcConnection conn = new OdbcConnection();

conn.ConnectionString =

"Driver={Microsoft dBASE Driver (*.dbf)};" +

"Driverid=277;" +

"Dbq=C:/MyPath/";

conn.Open();



// Use: sql = "Select * From MyDb.dbf"


————————————————
版权声明:本文为CSDN博主「cubit」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/cubit/article/details/2127810

相关文章