連接代碼:轉換連接字符串SQLOLEDB
set conx = Server.CreateObject("ADODB.connection")
conx.Open Application("connectionString")
set cmdx = server.CreateObject("ADODB.command")
cmdx.ActiveConnection = conx
cmdx.CommandText = "dbo.sproc"
cmdx.CommandType = &H0004
set rsx = Server.CreateObject("ADODB.Recordset")
rsx.open cmdx
resarray = rsx.getrows
此連接字符串的工作原理:
connectionString = "DRIVER=SQL Server;UID=User;Address=000.000.000.000;Network=DBMSSOCN;DATABASE=Database;SERVER=server;Password=password;"
這不......
connectionString = "Provider=SQLOLEDB;Data Source=000.000.000.000;UID=User;Address=000.000.000.000;Network=DBMSSOCN;DATABASE=Database;SERVER=server;Password=password;"
我得到的錯誤是:
ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.
我錯過了什麼?
工作得很好,謝謝! – NikolaiDante 2008-12-10 08:13:01