0

我有下面的代码,它给我一个错误“对象关闭时不允许操作”。我在这里想念什么?

 Dim dbconnect, dbresults

 Set dbconnect = CreateObject("ADODB.Connection")
 Set dbresult = CreateObject("ADODB.Recordset")

dbconnectString =  "driver=iSeries Access ODBC Driver;System=***;UID=***;PWD=***;Naming=1"
dbconnect.Open (dbconnectString)        
mySQLQuerry ="Select XOORIG  from FIQDLIB.FSFPXO as400xo WHERE as400xo.xoefdt = 1130418 and as400xo.xotrsq in (75440)"
dbresult.Open mySQLQuerry, dbconnect
4

1 回答 1

0

打开连接后检查连接状态WScript.Echo dbconnect.State。您的连接字符串也看起来关闭。根据此页面,驱动程序名称应放在大括号中。

于 2013-04-19T07:59:10.697 回答