C#数据库连接字符串——dBase Dbf

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

ODBC DSN
ODBC without 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

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博主「GB_Fore」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/mymhj/article/details/5566916

相关文章