Connection Via ADO to AS400

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Iain

    Connection Via ADO to AS400

    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="VB SCRIPT" CODEPAGE="1252" %>
    <html>
    <head> </head>
    <body>
    <%
    Dim Parent
    Dim BomSet
    Dim SelectString
    Dim conn

    Set conn = Server.CreateOb ject ("ADODB.Connect ion")
    conn.Open "Provider = Mapics; User ID = XXXXXX ;Password =
    XXXXXX;"
    Parent = "NEW3WTFB3-1"
    Set BomSet = Server.CreateOb ject("ADODB.Rec ordset")
    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.I tem("Cinbr").Va lue
    BomSet.MoveNext ()
    Wend
    BomSet.Close

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

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

    ADODB.Connectio n 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.xx x"
    Provider = "IBMDA400.DataS ource.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

  • Mike Brind

    #2
    Re: Connection Via ADO to AS400


    Iain wrote:[color=blue]
    > 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="VB SCRIPT" CODEPAGE="1252" %>
    > <html>
    > <head> </head>
    > <body>
    > <%
    > Dim Parent
    > Dim BomSet
    > Dim SelectString
    > Dim conn
    >
    > Set conn = Server.CreateOb ject ("ADODB.Connect ion")
    > conn.Open "Provider = Mapics; User ID = XXXXXX ;Password =
    > XXXXXX;"
    > Parent = "NEW3WTFB3-1"
    > Set BomSet = Server.CreateOb ject("ADODB.Rec ordset")
    > 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.I tem("Cinbr").Va lue
    > BomSet.MoveNext ()
    > Wend
    > BomSet.Close
    >
    > Conn.Close
    > Set Conn = Nothing
    > %>
    > </body>
    > </html>
    >
    > -------------------------------------------------------------------
    > The error displayed at run time is
    >
    > ADODB.Connectio n 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.xx x"
    > Provider = "IBMDA400.DataS ource.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?[/color]

    All connection strings in one place. Find the syntax for your database connection using ADO.NET, ADO, ODBC, OLEDB, C#, VB, VB.NET, ASP.NET and more.


    --
    Mike Brind

    Comment

    Working...