X = "ODBC;database=Northwind;DSN=Customers;UID=;PWD="
'要改DB_Con連線字串加入 DSN連線模式
@順序有關係
============================================
一開始用了 Data Source 出問題
後來改DataBase就OK
Dim s As String = "Driver={sql server SQL Server Native Client 10.0};Server=test;Data Source=test;UId=sa;PWD=12345;"
'Dim s As String = "Driver={SQL Server};Server=mis-06;Database=test;UId=sa;PWD=12345;"
====================================================================
資料庫之 ODBC 連線字串
http://tw.myblog.yahoo.com/cyrex4000/article?mid=2456
Connection strings for SQL Server 2008
如何使用 ODBC.NET 管理 Visual C#.NET 和連線字串中的提供者
[ADO.NET] 連線物件 (Connection)
ODBC連接字串格式:
"Driver={SQL Server};Server=(local);Trusted_Connection=Yes;Database=AdventureWorks;" "Driver={Microsoft ODBC for Oracle};Server=ORACLE8i7;Persist Security Info=False;Trusted_Connection=Yes" "Driver={Microsoft Access Driver (*.mdb)};DBQ=c:\bin\Northwind.mdb" "Driver={Microsoft Excel Driver (*.xls)};DBQ=c:\bin\book1.xls" "Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=c:\bin" "DSN=dsnname"
沒有留言:
張貼留言