set adocon=server.createobject(\"adodb.connection\")
adoconn.open\"driver={microsoft access driver(*.mdb)};dbq=\"& _
server.mappath(\"数据库所在路径\")
2.access ole db连接方法:
set adocon=server.createobject(\"adodb.connection\")
adocon.open\"provider=microsoft.jet.oledb.4.0;\"& _
\"data source=\" & server.mappath(\"数据库所在路径\")
3.sql server连接方法:
set adocon=server.createobject(\"adodb.recordset\")
adocon.open\"driver={sql server};server=(local);uid=***;pwd=***;\"& _
\"database=数据库名;\"
4.sql server ole db连接方法:
et adocon=server.createobject(\"adodb.connection\")
adocon.open\"provider=sqloledb.1;data source=ritant4;\"& _
\"user id=***;password=***;\"& _
\"inital catalog=数据库名\"
5.oracle 连接方法:
set adocon=server.createobject(\"adodb.connection\")
adocon.open\"driver={microsoft odbc for oracle};server=oraclesever.world;uid=admin;pwd=pass;\"
6.oracle ole db 连接方法:
set adocon=server.createobject(\"adodb.connection\")
adocon.open\"provider=oraoledb.oracle;data source=dbname;user id=admin;password=pass;\"
7.dbase 连接方法:
set adocon=server.createobject(\"adodb.connection\")
adocon.open\"driver={microsoft dbase driver(*.dbf)};driverid=277;dbq=------------;\"
8.mysql 连接方法:
set adocon=server.createobject(\"adodb.connection\")
adocon.open\"driver={mysql};database=yourdatabase;
uid=username;pwd=yourpassword;option=16386;\"
9.visual foxpro 连接方法:
set adocon=server.createobject(\"adodb.connection\")
adocon.open\"driver={microsoft visual foxpro driver};sourcetype=dbc;sourcedb=*.dbc;exclusive=no;\"
10.ms text 连接方法:
set adocon=server.createobject(\"adodb.connection\")
adocon.open\"driver={microsoft text driver(*.txt; *.csv)};dbq=-----;\"&_
\"extensions=asc,csv,tab,txt;persist securityinfo=false;\"