ASP连接13种数据库语法总结

1.Access ODBC链接方法:

Conn.open "Driver={Microsoft Access Driver (*.mdb)};DBQ=数据库路径"

2.Access OLEDB连接方法:

Conn.open"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=数据库路径"

3.SQL server ODBC链接方法:

Conn.Open"Driver={SQL Server};server=(local);uid=***;pwd=***;database=数据库名;"

4.SQL server OLEDB连接方法:

Conn.open"Provider=SQLOLEDB;Data Source=(local);Initial Catalog=数据库名;User ID=***;Password=***"

5.Oracle ODBC链接方法:

conn.open"Driver={microsoft odbc for oracle};server=oraclesever.world;uid=***;pwd=***;"

6.Oracle OLEDB连接方法:

conn.open"Provider=OraOLEDB.Oracle;data source=dbname;user id=***;password=***;"

7.Excel ODBC链接方法:

Conn.open "Driver={Microsoft Excel Driver (*.xls)};DBQ=" & Server.MapPath("*.xls")

8.Dbase ODBC链接方法:

conn.open"Driver={microsoft dbase driver(*.dbf)};driverid=277;dbq=数据库名;"

9.MySQL ODBC链接方法:

conn.open"Driver={mysql};database=yourdatabase;uid=***;pwd=***;option=16386;"

10.Visual Foxpro ODBC链接方法:

conn.open"Driver={microsoft Visual Foxpro driver};sourcetype=DBC;sourceDB=*.dbc;Exclusive=No;"

11.MS text ODBC链接方法:

conn.open"Driver={microsoft text driver(*.txt; *.csv)};dbq=数据库名;extensions=asc,csv,tab,txt;Persist SecurityInfo=false;"

12.MS text OLEDB 连接方法:

conn.open"Provider=microsof.jet.oledb.4.0;data source=your_path;Extended Properties'text;FMT=Delimited'"

13.SQLite ODBC链接方法:

Conn.open"DRIVER={SQLite3 ODBC Driver};DATABASE=数据库路径"

评论: 1 | 引用: 0 | 查看次数: 9362
发表评论
登录后再发表评论!