如果使用SQL服务器,在本地用不用设置odbc数据源
服务器是172.18.33.156
用户user1
密码user1
数据库user1db
Set conn = Server.CreateObject( "ADODB.Connection ")
conn.Open "driver={SQL Server}; "172.18.33.156 "; "user1 "; "user1 "; "user1db "
不知这样做有没错,连不上。。。
在线等
------解决方案--------------------
conn.Open "Provider=SQLOLEDB;Data source=172.18.33.156;Initial Catalog=user1db;User ID=user1;Password=user1; "