Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection to AS/400 using ASP

Status
Not open for further replies.

d1004

Programmer
May 9, 2002
78
US
This is my first time using AS/400, so I'm not sure if i am doing this right.
What I am trying to do is create a login application to the AS/400 using ASP. However, I have not create a DSN for the connection. But I'm going to use the connection string instead. When I run, it generates the following error msg:

ADODB.Connection error '800a0e7a'
Provider cannot be found. It may not be properly installed.

Here are my codes:


Dim objRS, objConn, strSQL, identification, userpassword
identification = Session("userID")
userpassword = Request.Form("Password")

strConnect = "Provider=IBMDA400;Data Source=S02;Transport Product=Client Access;SSL=DEFAULT; UID = '" & identification & "';" & _
"PWD = '" & userpassword & "'"

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strConnect
strSQL = "SELECT * FROM tablename" & _
"WHERE tableField= '" & identification & "'"

Set objRS = objConn.Execute (strSQL)


Thank you!!
 
no single quotes in strConnect...

strConnect = "Provider=IBMDA400;Data Source=S02;Transport Product=Client Access;SSL=DEFAULT; UID = " & identification & ";" & _
"PWD = " & userpassword Get the Best Answers! faq333-2924
Happy 2003! [cheers]
mikewolf@tst-us.com
 
I knew that looked familiar thread333-434196
funny how the output results in the same thing

last post in regards to connection to the 400 box
Provider=IBMDA400;Data Source=blah;Transport Product=Client Access;SSL=DEFAULT; userID =;Database Password =;

this post
Provider=IBMDA400;Data Source=S02;Transport Product=Client Access;SSL=DEFAULT; UID = ;PWD =


one note
"User Id=myUsername;" & _
"Password=myPassword"
proper syntax from IBM + Microsoft OLE DB connections
and in this case now you're doing a ODBC connection format
"User Id=myUsername;" & _
"Password=myPassword"


so which is it? ---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee");alert(Nstr); }
---------------------------------------
for the best results to your questions: FAQ333-2924

 
I'm trying different methods to see which one works.
I also try to eliminate the single quotes before too, but it doesn't work either.
 
hmm.. are you athourized to connect to the box?
if your not then nothing is going to work
---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee");alert(Nstr); }
---------------------------------------
for the best results to your questions: FAQ333-2924

 
I have access right to the As/400 & certain tables. But I don't have right to the security area where
the userID & password are reside at.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top