Connection Via ADO to AS400

Discussion in 'ASP General' started by Iain, May 8, 2006.

  1. Iain

    Iain Guest

    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
     
    Iain, May 8, 2006
    #1
    1. Advertising

  2. Iain

    Mike Brind Guest

    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
     
    Mike Brind, May 9, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nita
    Replies:
    1
    Views:
    904
    Saravana
    Nov 20, 2004
  2. ronaldlee

    Transfer ADO Code to ADO.NET

    ronaldlee, Dec 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    491
    Kevin Spencer
    Dec 17, 2004
  3. Drew
    Replies:
    1
    Views:
    815
    Rhino
    Feb 17, 2005
  4. mechweb

    ASP connection to DB2/AS400

    mechweb, Jul 7, 2003, in forum: ASP General
    Replies:
    9
    Views:
    306
    Ray at
    Jul 7, 2003
  5. rob
    Replies:
    0
    Views:
    199
Loading...

Share This Page