----- Original Message -----
Sent: Monday, July 30, 2001 07:27
Subject: RE: Info on using ASP to read
DB2 on AS400
The
command object shouldn't make a difference. Execute is a valid method on the
connection object. Of course I'm not sure why the command object is in the
mix, but it's not hurting anything.
Sushama, have you checked the AS/400 joblog for the connection? You'll
find the joblog to be the best source of debugging information when these
things occur.
-Walden
It looks like you're trying to call execute on
your connection object instead of your command object.
----- Original Message -----
Sent: Friday, July 27, 2001 15:20
Subject: Re: Info on using ASP to read
DB2 on AS400
I am getting the following error and cannot figure out
why:
IBMDA400 Command error '80004005'
CWBDB0036 - Server returned SQL error
/sush/agentwatch.asp, line 38
Here is a part of my code:
<%
Dim cn
Dim cm
Dim rs
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open "Provider=IBMDA400; Data Source=AS400;", "abc",
"xyz"
Set cm =
Server.CreateObject("ADODB.Command")
Set
cm.ActiveConnection = cn
cm.Properties("Updatability") = 0
cm.CommandType = adCmdText
strsql = "Select *
from spil/pdbagent "
set rs = cn.Execute
(strsql)
<<--- line 38
%>
I guess it has something to do with the library/file not
being recognized.
In an earlier example I had used
:
cm.CommandText = "/QSYS.LIB/SPIL.LIB/PBDAGENT.FILE(*FIRST,
*NONE)"
cm.CommandType = adCmdTable
Set rs = cm.Execute
But I wanted to use SQL instead. I would highly appreciate
it if someone could point out to me how to do this.
Thank you in advance.
Sushama