PB 通过ODBC或OLEDB连接ACCESS
1. ODBC
1.1 建立ODBC数据源
1.2 // Profile
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=xtktv;UID=admin;PWD=000000'"
2. 直接连接
不用配置odbc的,SQLCA.DBParm = "ConnectString='DSN=MS Access Database;PWD=密码;dbq=数据库名称'"
MS Access Database 这个是安装好MDAC后默认就有了这样一个ODBC的DSN,可以直接拿来用。
// Profile
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=MS Access Database;UID=admin;PWD=000000;dbq=xtktv.mdb'"
3. OLE DB
// Profile
SQLCA.DBMS = "OLE DB"
SQLCA.AutoCommit = False
SQLCA.DBParm = "PROVIDER='Microsoft.Jet.OLEDB.4.0',DATASOURCE='H:/js.mdb'"