各种数据库的ado连接字符串
1.Oracle:
a>先设置好Oracle本地服务名配置,如:USER_DB
b>配置ODBC引擎:ODBC_DB,该引擎的服务器指向Oracle的本地服务名,即:USER_DB
c>配置联接字符串,如:Provider=MSDASQL.1;Password=user;Persist Security Info=True;User ID=user;Data Source=ODBC_DB;Extended Properties="DSN=ODBC_DB;UID=user;PWD=user;SERVER=USER_DB;"
2.Access
联接字符串:Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:/aa.mdb;Jet OLEDB:Database password=123
3.DBF(Dbase数据库)
联接字符串:Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=D:/DBF/;Mode=Share Deny None;Extended Properties=DBase 5.0
4.Excel
联接字符串:Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source=F:/Excel/demo.xls;Mode=Share Deny None;Extended Properties=Excel 8.0;
5.TEXT
联接字符串:Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source=D:/txt;Mode=Share Deny None;Extended Properties="text;HDR=YES;FMT=Delimited"
6.DBF(Visual Foxpro数据库)
联接字符串:Provider=MSDASQL;Persist Security Info=False;Extended Properties="DSN=Visual FoxPro Tables;UID=;SourceDB=D:/DBF/;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
7.db(Paradox7.0)
联接字符串:Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Borland/Borland Shared/Data;Mode=Share Deny None;Extended Properties=paradox 7.x
此系转贴:
转自:爱晴论坛 -> 『程序开发』 -> ≮Delphi讨论区≯ -> 各种数据库的ado连接字符串