|
John,
Thanks for replying. I tried your suggestion but got the exact same error.
Here is what I added :
cm.CommandType = adCmdText
strsql = "Select * from spil/pdbagent"
cm.CommandText = strsql
set rs = cm.Execute
I feel it is not able to figure out where library "spil" is. In my previous sample (where I did used command type as table) I had specified:
cm.CommandText = "/QSYS.LIB/SPIL.LIB/PBDAGENT.FILE(*FIRST, *NONE)"
In the SQL statement I do not know how to do that. I am not certain, but I believe that is my problem.
Any help is appreciated.
Thank you in advance.
Sushama
-----Original Message-----
From: John Taylor [mailto:jtaylor@rpg2java.com]
Sent: Friday, July 27, 2001 5:03 PM
To: WEB400@midrange.com
Subject: Re: Info on using ASP to read DB2 on AS400
It looks like you're trying to call execute on your connection object instead of your command object.
----- Original Message -----
From: Pillai, Sushama
To: WEB400@midrange.com
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
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.