ASP source connect to System i (AS400)

pts.
Tags:
AS 400
ASP
Hi.

Now, I create ODBC of system i access software and config finished

But, I can not get data form database on System i for show

Souce code as below.
(It connected to ODBC but can not get data for show)


<%
ConnectionString= "Driver={iSeries Access ODBC Driver}; System=10.230.1.32; UID=PCS; PWD=PCS;"
set con = Server.CreateObject("ADODB.Connection")
con.open(ConnectionString)


Set rs = Server.CreateObject("ADODB.Recordset")


on error resume next

set rs=server.CreateObject("adodb.recordset")
sql="select * from KORAKOTLIB.QRPGSRC"
rs.open sql,conn,1,3
if err.number<> 0 then
response.write err.Description&"<br>"
response.write err.source&"<br>"
response.write err.number
else
response.write "succeed"
end if

on error goto 0
%>

On run it display error :
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
ADODB.Recordset
3001

Please support me for rolve this problme

if nay question or not clear, please post message in this borad..

Thank you.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

You do open:

rs.open sql,conn,1,3

but you created connection:

set con = Server.CreateObject(“ADODB.Connection”)

regards.

Cezary Opacki

 

 

 

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • andyhumphreys
    Is this correct? set rs=server.CreateObject(“adodb.recordset”)?Isn't case sensitivity an issue here?
    465 pointsBadges:
    report
  • TomLiotta
    rs.open sql,conn,1,3   What is "conn"?   Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following