CSDN博客

img ringee

连接数据库

发表于2004/10/17 18:08:00  700人阅读


连接ACCESS

"Driver={microsoft access driver(*.mdb)};dbq=*.mdb;uid=admin;pwd=pass;"

"Provider=microsoft.jet.oledb.4.0;data source=your_database_path;user id=admin;password=pass;"

dim conn
set conn = server.createobject("adodb.connection")
conn.open = "provider=microsoft.jet.oledb.4.0;" & "data source = " & server.mappath("../database/db.mdb")

连接MSSQL server
"Driver={sql server};server=servername;database=dbname;uid=sa;pwd=pass;"

"Provider=SQLOLEDB;data source=servername;initial catalog=databasename;userid=sa;password=pass;"


阅读全文
0 0

相关文章推荐

img
取 消
img