Connect to the database

xiaoxiao2021-03-06  114

Connect 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")

Connect 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;"

转载请注明原文地址:https://www.9cbs.com/read-105189.html

New Post(0)