Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Connection Via ADO to AS400

Reply
Thread Tools

Connection Via ADO to AS400

 
 
Iain
Guest
Posts: n/a
 
      05-08-2006
Hi

Can anyone please help as I am going nuts This script fails and I
cannot get it to work in any fashion.

I have the following simple code

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head> </head>
<body>
<%
Dim Parent
Dim BomSet
Dim SelectString
Dim conn

Set conn = Server.CreateObject ("ADODB.Connection")
conn.Open "Provider = Mapics; User ID = XXXXXX ;Password =
XXXXXX;"
Parent = "NEW3WTFB3-1"
Set BomSet = Server.CreateObject("ADODB.Recordset")
SelectString = "Select PINBR, USRS1, CINBR, QTYPR From
AMFLIBA.PStruc WHERE Pinbr = "'" & Parent & "'"
With BomSet
.CursorType = 0
.CursorLocation = 2
.LockType = 1
Open SelectString
End With

While not BomSet.Eof
Response.Write Parent & " - " &
BomSet.Fields.Item("Cinbr").Value
BomSet.MoveNext()
Wend
BomSet.Close

Conn.Close
Set Conn = Nothing
%>
</body>
</html>

-------------------------------------------------------------------
The error displayed at run time is

ADODB.Connection error '800a0e7a'

Provider cannot be found. It may not be properly installed.

/DundeeMIS/BOMXplosion.asp, line 12
-------------------------------------------------------------------

The actual line is

conn.Open "Provider = Mapics; User ID = XXXXXX ;Password =
XXXXXX;"


The provider Maipcs is one we use for other applications ie using
Delphi, Lotusscript etc

I have also tried providing the connection data directly (dsnless
connection)

Data Source = "xxx.xxx.xxx.xxx"
Provider = "IBMDA400.DataSource.1"
Password = "XXXXXX"
User ID = "XXXXXX"
Protection Level = None
Initial Catalog = "MAPMODF"
Transport Product = "Client Access"
SSL = "DEFAULT"
Force Translate = 65535
Cursor Sensitivity = 3

but that does not work either

Anyone have any ideas?


Thanks in advance

Iain

 
Reply With Quote
 
 
 
 
Mike Brind
Guest
Posts: n/a
 
      05-09-2006

Iain wrote:
> Hi
>
> Can anyone please help as I am going nuts This script fails and I
> cannot get it to work in any fashion.
>
> I have the following simple code
>
> <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> <html>
> <head> </head>
> <body>
> <%
> Dim Parent
> Dim BomSet
> Dim SelectString
> Dim conn
>
> Set conn = Server.CreateObject ("ADODB.Connection")
> conn.Open "Provider = Mapics; User ID = XXXXXX ;Password =
> XXXXXX;"
> Parent = "NEW3WTFB3-1"
> Set BomSet = Server.CreateObject("ADODB.Recordset")
> SelectString = "Select PINBR, USRS1, CINBR, QTYPR From
> AMFLIBA.PStruc WHERE Pinbr = "'" & Parent & "'"
> With BomSet
> .CursorType = 0
> .CursorLocation = 2
> .LockType = 1
> Open SelectString
> End With
>
> While not BomSet.Eof
> Response.Write Parent & " - " &
> BomSet.Fields.Item("Cinbr").Value
> BomSet.MoveNext()
> Wend
> BomSet.Close
>
> Conn.Close
> Set Conn = Nothing
> %>
> </body>
> </html>
>
> -------------------------------------------------------------------
> The error displayed at run time is
>
> ADODB.Connection error '800a0e7a'
>
> Provider cannot be found. It may not be properly installed.
>
> /DundeeMIS/BOMXplosion.asp, line 12
> -------------------------------------------------------------------
>
> The actual line is
>
> conn.Open "Provider = Mapics; User ID = XXXXXX ;Password =
> XXXXXX;"
>
>
> The provider Maipcs is one we use for other applications ie using
> Delphi, Lotusscript etc
>
> I have also tried providing the connection data directly (dsnless
> connection)
>
> Data Source = "xxx.xxx.xxx.xxx"
> Provider = "IBMDA400.DataSource.1"
> Password = "XXXXXX"
> User ID = "XXXXXX"
> Protection Level = None
> Initial Catalog = "MAPMODF"
> Transport Product = "Client Access"
> SSL = "DEFAULT"
> Force Translate = 65535
> Cursor Sensitivity = 3
>
> but that does not work either
>
> Anyone have any ideas?


http://www.connectionstrings.com/

--
Mike Brind

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
connecting to as400 via java servlet..not quite right Drew Java 1 02-17-2005 03:41 PM
Translating Oracle Package Call from ADO to ADO.Net dmiratsky@yahoo.com ASP .Net 0 02-14-2005 10:39 PM
Transfer ADO Code to ADO.NET ronaldlee ASP .Net 1 12-17-2004 04:08 PM
Accessing an ADO Recordset or Record from ADO.NET nita ASP .Net 1 11-20-2004 07:06 AM
ASP connection to DB2/AS400 mechweb ASP General 9 07-07-2003 07:03 PM



Advertisments