ASP connection to DB2/AS400

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

    ASP connection to DB2/AS400

    I am trying to connect to a DB2 database on an AS400 via ASP. On the server
    I can connect fine using VB, but keep getting a communcation link failure
    when using the exact same code in ASP. Here is my code (I know the AS400
    ODBC DSN works ok because I can connect to it from MS Access with no
    problems):

    set cnn = server.createob ject("adodb.con nection")
    set rs = server.createob ject("adodb.rec ordset")
    cnn.open "DSN=SYSTEM 2"

    Help!


  • Ray at

    #2
    Re: ASP connection to DB2/AS400

    Do you have the DSN setup on the server? Do you have drivers installed?

    Ray at work

    "mechweb" <mechweb@yahoo. com> wrote in message
    news:eUpqg2IRDH A.2424@tk2msftn gp13.phx.gbl...[color=blue]
    > I am trying to connect to a DB2 database on an AS400 via ASP. On the[/color]
    server[color=blue]
    > I can connect fine using VB, but keep getting a communcation link failure
    > when using the exact same code in ASP. Here is my code (I know the AS400
    > ODBC DSN works ok because I can connect to it from MS Access with no
    > problems):
    >
    > set cnn = server.createob ject("adodb.con nection")
    > set rs = server.createob ject("adodb.rec ordset")
    > cnn.open "DSN=SYSTEM 2"
    >
    > Help!
    >
    >[/color]


    Comment

    • mechweb

      #3
      Re: ASP connection to DB2/AS400

      I am using IBM's client access software and have setup a DSN which works via
      VB. When I try using the DSN-less connection string below, I get provider
      cannot be found.

      "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
      news:uej3nEJRDH A.2276@TK2MSFTN GP12.phx.gbl...[color=blue]
      > p.s. Try dsn-less. For IBM's CA drivers, use:
      > Provider=IBMDA4 00.DataSource.1 ;Persist Security Info=False;Data
      > Source=YourAS40 0Name;
      >
      > Ray at work
      >
      > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
      > news:%23X53BBJR DHA.712@TK2MSFT NGP12.phx.gbl.. .[color=green]
      > > Do you have the DSN setup on the server? Do you have drivers installed?
      > >
      > > Ray at work
      > >
      > > "mechweb" <mechweb@yahoo. com> wrote in message
      > > news:eUpqg2IRDH A.2424@tk2msftn gp13.phx.gbl...[color=darkred]
      > > > I am trying to connect to a DB2 database on an AS400 via ASP. On the[/color]
      > > server[color=darkred]
      > > > I can connect fine using VB, but keep getting a communcation link[/color][/color]
      > failure[color=green][color=darkred]
      > > > when using the exact same code in ASP. Here is my code (I know the[/color][/color][/color]
      AS400[color=blue][color=green][color=darkred]
      > > > ODBC DSN works ok because I can connect to it from MS Access with no
      > > > problems):
      > > >
      > > > set cnn = server.createob ject("adodb.con nection")
      > > > set rs = server.createob ject("adodb.rec ordset")
      > > > cnn.open "DSN=SYSTEM 2"
      > > >
      > > > Help!
      > > >
      > > >[/color]
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • mechweb

        #4
        Re: ASP connection to DB2/AS400

        Yes they are, I am actually using my desktop as a dev server. When I go into
        the ODBC admin I can see IBM Client Access under the drivers tab.

        "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
        news:uAnoicJRDH A.2228@tk2msftn gp13.phx.gbl...[color=blue]
        > Are the IBM DB/2 drivers installed on the server though? It doesn't sound
        > like it.
        >
        > Ray at work
        >
        > "mechweb" <mechweb@yahoo. com> wrote in message
        > news:eO7ZMQJRDH A.2636@TK2MSFTN GP10.phx.gbl...[color=green]
        > > I am using IBM's client access software and have setup a DSN which works[/color]
        > via[color=green]
        > > VB. When I try using the DSN-less connection string below, I get[/color][/color]
        provider[color=blue][color=green]
        > > cannot be found.
        > >
        > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
        > > news:uej3nEJRDH A.2276@TK2MSFTN GP12.phx.gbl...[color=darkred]
        > > > p.s. Try dsn-less. For IBM's CA drivers, use:
        > > > Provider=IBMDA4 00.DataSource.1 ;Persist Security Info=False;Data
        > > > Source=YourAS40 0Name;
        > > >
        > > > Ray at work
        > > >
        > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
        > > > news:%23X53BBJR DHA.712@TK2MSFT NGP12.phx.gbl.. .
        > > > > Do you have the DSN setup on the server? Do you have drivers[/color][/color]
        > installed?[color=green][color=darkred]
        > > > >
        > > > > Ray at work
        > > > >
        > > > > "mechweb" <mechweb@yahoo. com> wrote in message
        > > > > news:eUpqg2IRDH A.2424@tk2msftn gp13.phx.gbl...
        > > > > > I am trying to connect to a DB2 database on an AS400 via ASP. On[/color][/color][/color]
        the[color=blue][color=green][color=darkred]
        > > > > server
        > > > > > I can connect fine using VB, but keep getting a communcation link
        > > > failure
        > > > > > when using the exact same code in ASP. Here is my code (I know the[/color]
        > > AS400[color=darkred]
        > > > > > ODBC DSN works ok because I can connect to it from MS Access with[/color][/color][/color]
        no[color=blue][color=green][color=darkred]
        > > > > > problems):
        > > > > >
        > > > > > set cnn = server.createob ject("adodb.con nection")
        > > > > > set rs = server.createob ject("adodb.rec ordset")
        > > > > > cnn.open "DSN=SYSTEM 2"
        > > > > >
        > > > > > Help!
        > > > > >
        > > > > >
        > > > >
        > > > >
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Ray at

          #5
          Re: ASP connection to DB2/AS400

          Huh, how about that. Alright, with your DSN that you have setup, is that a
          user DSN or system? Try creating a system DSN (and testing it) and see if
          that helps.

          Ray at work

          "mechweb" <mechweb@yahoo. com> wrote in message
          news:OfUZnzJRDH A.3236@TK2MSFTN GP10.phx.gbl...[color=blue]
          > Yes they are, I am actually using my desktop as a dev server. When I go[/color]
          into[color=blue]
          > the ODBC admin I can see IBM Client Access under the drivers tab.
          >
          > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
          > news:uAnoicJRDH A.2228@tk2msftn gp13.phx.gbl...[color=green]
          > > Are the IBM DB/2 drivers installed on the server though? It doesn't[/color][/color]
          sound[color=blue][color=green]
          > > like it.
          > >
          > > Ray at work
          > >
          > > "mechweb" <mechweb@yahoo. com> wrote in message
          > > news:eO7ZMQJRDH A.2636@TK2MSFTN GP10.phx.gbl...[color=darkred]
          > > > I am using IBM's client access software and have setup a DSN which[/color][/color][/color]
          works[color=blue][color=green]
          > > via[color=darkred]
          > > > VB. When I try using the DSN-less connection string below, I get[/color][/color]
          > provider[color=green][color=darkred]
          > > > cannot be found.
          > > >
          > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
          > > > news:uej3nEJRDH A.2276@TK2MSFTN GP12.phx.gbl...
          > > > > p.s. Try dsn-less. For IBM's CA drivers, use:
          > > > > Provider=IBMDA4 00.DataSource.1 ;Persist Security Info=False;Data
          > > > > Source=YourAS40 0Name;
          > > > >
          > > > > Ray at work
          > > > >
          > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
          > > > > news:%23X53BBJR DHA.712@TK2MSFT NGP12.phx.gbl.. .
          > > > > > Do you have the DSN setup on the server? Do you have drivers[/color]
          > > installed?[color=darkred]
          > > > > >
          > > > > > Ray at work
          > > > > >
          > > > > > "mechweb" <mechweb@yahoo. com> wrote in message
          > > > > > news:eUpqg2IRDH A.2424@tk2msftn gp13.phx.gbl...
          > > > > > > I am trying to connect to a DB2 database on an AS400 via ASP. On[/color][/color]
          > the[color=green][color=darkred]
          > > > > > server
          > > > > > > I can connect fine using VB, but keep getting a communcation[/color][/color][/color]
          link[color=blue][color=green][color=darkred]
          > > > > failure
          > > > > > > when using the exact same code in ASP. Here is my code (I know[/color][/color][/color]
          the[color=blue][color=green][color=darkred]
          > > > AS400
          > > > > > > ODBC DSN works ok because I can connect to it from MS Access[/color][/color][/color]
          with[color=blue]
          > no[color=green][color=darkred]
          > > > > > > problems):
          > > > > > >
          > > > > > > set cnn = server.createob ject("adodb.con nection")
          > > > > > > set rs = server.createob ject("adodb.rec ordset")
          > > > > > > cnn.open "DSN=SYSTEM 2"
          > > > > > >
          > > > > > > Help!
          > > > > > >
          > > > > > >
          > > > > >
          > > > > >
          > > > >
          > > > >
          > > >
          > > >[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • mechweb

            #6
            Re: ASP connection to DB2/AS400

            The DSN I have been using is a system DSN. In VB, I can get data back no
            problem, but ASP is giving me hell. I have tried about 50 variations of a
            connection string to no avail. I still think ASP should work just like in
            VB, but it doesn't. Aaarrrrgggghhhh h!!!!!!!

            "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
            news:%23Q5yS3JR DHA.704@tk2msft ngp13.phx.gbl.. .[color=blue]
            > Huh, how about that. Alright, with your DSN that you have setup, is that[/color]
            a[color=blue]
            > user DSN or system? Try creating a system DSN (and testing it) and see if
            > that helps.
            >
            > Ray at work
            >
            > "mechweb" <mechweb@yahoo. com> wrote in message
            > news:OfUZnzJRDH A.3236@TK2MSFTN GP10.phx.gbl...[color=green]
            > > Yes they are, I am actually using my desktop as a dev server. When I go[/color]
            > into[color=green]
            > > the ODBC admin I can see IBM Client Access under the drivers tab.
            > >
            > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
            > > news:uAnoicJRDH A.2228@tk2msftn gp13.phx.gbl...[color=darkred]
            > > > Are the IBM DB/2 drivers installed on the server though? It doesn't[/color][/color]
            > sound[color=green][color=darkred]
            > > > like it.
            > > >
            > > > Ray at work
            > > >
            > > > "mechweb" <mechweb@yahoo. com> wrote in message
            > > > news:eO7ZMQJRDH A.2636@TK2MSFTN GP10.phx.gbl...
            > > > > I am using IBM's client access software and have setup a DSN which[/color][/color]
            > works[color=green][color=darkred]
            > > > via
            > > > > VB. When I try using the DSN-less connection string below, I get[/color]
            > > provider[color=darkred]
            > > > > cannot be found.
            > > > >
            > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
            > > > > news:uej3nEJRDH A.2276@TK2MSFTN GP12.phx.gbl...
            > > > > > p.s. Try dsn-less. For IBM's CA drivers, use:
            > > > > > Provider=IBMDA4 00.DataSource.1 ;Persist Security Info=False;Data
            > > > > > Source=YourAS40 0Name;
            > > > > >
            > > > > > Ray at work
            > > > > >
            > > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
            > > > > > news:%23X53BBJR DHA.712@TK2MSFT NGP12.phx.gbl.. .
            > > > > > > Do you have the DSN setup on the server? Do you have drivers
            > > > installed?
            > > > > > >
            > > > > > > Ray at work
            > > > > > >
            > > > > > > "mechweb" <mechweb@yahoo. com> wrote in message
            > > > > > > news:eUpqg2IRDH A.2424@tk2msftn gp13.phx.gbl...
            > > > > > > > I am trying to connect to a DB2 database on an AS400 via ASP.[/color][/color][/color]
            On[color=blue][color=green]
            > > the[color=darkred]
            > > > > > > server
            > > > > > > > I can connect fine using VB, but keep getting a communcation[/color][/color]
            > link[color=green][color=darkred]
            > > > > > failure
            > > > > > > > when using the exact same code in ASP. Here is my code (I know[/color][/color]
            > the[color=green][color=darkred]
            > > > > AS400
            > > > > > > > ODBC DSN works ok because I can connect to it from MS Access[/color][/color]
            > with[color=green]
            > > no[color=darkred]
            > > > > > > > problems):
            > > > > > > >
            > > > > > > > set cnn = server.createob ject("adodb.con nection")
            > > > > > > > set rs = server.createob ject("adodb.rec ordset")
            > > > > > > > cnn.open "DSN=SYSTEM 2"
            > > > > > > >
            > > > > > > > Help!
            > > > > > > >
            > > > > > > >
            > > > > > >
            > > > > > >
            > > > > >
            > > > > >
            > > > >
            > > > >
            > > >
            > > >[/color]
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • Ray at

              #7
              Re: ASP connection to DB2/AS400

              You're right. It should in this case. Just for the hell of it, post
              relevant code and the error/line number.

              Ray at work

              "mechweb" <mechweb@yahoo. com> wrote in message
              news:uR8DO7JRDH A.2636@TK2MSFTN GP10.phx.gbl...[color=blue]
              > The DSN I have been using is a system DSN. In VB, I can get data back no
              > problem, but ASP is giving me hell. I have tried about 50 variations of a
              > connection string to no avail. I still think ASP should work just like in
              > VB, but it doesn't. Aaarrrrgggghhhh h!!!!!!!
              >
              > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
              > news:%23Q5yS3JR DHA.704@tk2msft ngp13.phx.gbl.. .[color=green]
              > > Huh, how about that. Alright, with your DSN that you have setup, is[/color][/color]
              that[color=blue]
              > a[color=green]
              > > user DSN or system? Try creating a system DSN (and testing it) and see[/color][/color]
              if[color=blue][color=green]
              > > that helps.
              > >
              > > Ray at work
              > >
              > > "mechweb" <mechweb@yahoo. com> wrote in message
              > > news:OfUZnzJRDH A.3236@TK2MSFTN GP10.phx.gbl...[color=darkred]
              > > > Yes they are, I am actually using my desktop as a dev server. When I[/color][/color][/color]
              go[color=blue][color=green]
              > > into[color=darkred]
              > > > the ODBC admin I can see IBM Client Access under the drivers tab.
              > > >
              > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
              > > > news:uAnoicJRDH A.2228@tk2msftn gp13.phx.gbl...
              > > > > Are the IBM DB/2 drivers installed on the server though? It doesn't[/color]
              > > sound[color=darkred]
              > > > > like it.
              > > > >
              > > > > Ray at work
              > > > >
              > > > > "mechweb" <mechweb@yahoo. com> wrote in message
              > > > > news:eO7ZMQJRDH A.2636@TK2MSFTN GP10.phx.gbl...
              > > > > > I am using IBM's client access software and have setup a DSN which[/color]
              > > works[color=darkred]
              > > > > via
              > > > > > VB. When I try using the DSN-less connection string below, I get
              > > > provider
              > > > > > cannot be found.
              > > > > >
              > > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
              > > > > > news:uej3nEJRDH A.2276@TK2MSFTN GP12.phx.gbl...
              > > > > > > p.s. Try dsn-less. For IBM's CA drivers, use:
              > > > > > > Provider=IBMDA4 00.DataSource.1 ;Persist Security Info=False;Data
              > > > > > > Source=YourAS40 0Name;
              > > > > > >
              > > > > > > Ray at work
              > > > > > >
              > > > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
              > > > > > > news:%23X53BBJR DHA.712@TK2MSFT NGP12.phx.gbl.. .
              > > > > > > > Do you have the DSN setup on the server? Do you have drivers
              > > > > installed?
              > > > > > > >
              > > > > > > > Ray at work
              > > > > > > >
              > > > > > > > "mechweb" <mechweb@yahoo. com> wrote in message
              > > > > > > > news:eUpqg2IRDH A.2424@tk2msftn gp13.phx.gbl...
              > > > > > > > > I am trying to connect to a DB2 database on an AS400 via[/color][/color][/color]
              ASP.[color=blue]
              > On[color=green][color=darkred]
              > > > the
              > > > > > > > server
              > > > > > > > > I can connect fine using VB, but keep getting a communcation[/color]
              > > link[color=darkred]
              > > > > > > failure
              > > > > > > > > when using the exact same code in ASP. Here is my code (I[/color][/color][/color]
              know[color=blue][color=green]
              > > the[color=darkred]
              > > > > > AS400
              > > > > > > > > ODBC DSN works ok because I can connect to it from MS Access[/color]
              > > with[color=darkred]
              > > > no
              > > > > > > > > problems):
              > > > > > > > >
              > > > > > > > > set cnn = server.createob ject("adodb.con nection")
              > > > > > > > > set rs = server.createob ject("adodb.rec ordset")
              > > > > > > > > cnn.open "DSN=SYSTEM 2"
              > > > > > > > >
              > > > > > > > > Help!
              > > > > > > > >
              > > > > > > > >
              > > > > > > >
              > > > > > > >
              > > > > > >
              > > > > > >
              > > > > >
              > > > > >
              > > > >
              > > > >
              > > >
              > > >[/color]
              > >
              > >[/color]
              >
              >[/color]


              Comment

              • mechweb

                #8
                Re: ASP connection to DB2/AS400

                Here is the error, it craps out on the line that contains my cnn.open (the
                code is in my first post I think):

                Error Type:
                Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
                [IBM][Client Access ODBC Driver (32-bit)][DB2/400 SQL]Communication link
                failure. COMM RC=0x3
                /d1main/fieldbulletin_d etail.asp, line 6

                "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                news:%23qwYS9JR DHA.2460@TK2MSF TNGP10.phx.gbl. ..[color=blue]
                > You're right. It should in this case. Just for the hell of it, post
                > relevant code and the error/line number.
                >
                > Ray at work
                >
                > "mechweb" <mechweb@yahoo. com> wrote in message
                > news:uR8DO7JRDH A.2636@TK2MSFTN GP10.phx.gbl...[color=green]
                > > The DSN I have been using is a system DSN. In VB, I can get data back no
                > > problem, but ASP is giving me hell. I have tried about 50 variations of[/color][/color]
                a[color=blue][color=green]
                > > connection string to no avail. I still think ASP should work just like[/color][/color]
                in[color=blue][color=green]
                > > VB, but it doesn't. Aaarrrrgggghhhh h!!!!!!!
                > >
                > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                > > news:%23Q5yS3JR DHA.704@tk2msft ngp13.phx.gbl.. .[color=darkred]
                > > > Huh, how about that. Alright, with your DSN that you have setup, is[/color][/color]
                > that[color=green]
                > > a[color=darkred]
                > > > user DSN or system? Try creating a system DSN (and testing it) and[/color][/color][/color]
                see[color=blue]
                > if[color=green][color=darkred]
                > > > that helps.
                > > >
                > > > Ray at work
                > > >
                > > > "mechweb" <mechweb@yahoo. com> wrote in message
                > > > news:OfUZnzJRDH A.3236@TK2MSFTN GP10.phx.gbl...
                > > > > Yes they are, I am actually using my desktop as a dev server. When I[/color][/color]
                > go[color=green][color=darkred]
                > > > into
                > > > > the ODBC admin I can see IBM Client Access under the drivers tab.
                > > > >
                > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                > > > > news:uAnoicJRDH A.2228@tk2msftn gp13.phx.gbl...
                > > > > > Are the IBM DB/2 drivers installed on the server though? It[/color][/color][/color]
                doesn't[color=blue][color=green][color=darkred]
                > > > sound
                > > > > > like it.
                > > > > >
                > > > > > Ray at work
                > > > > >
                > > > > > "mechweb" <mechweb@yahoo. com> wrote in message
                > > > > > news:eO7ZMQJRDH A.2636@TK2MSFTN GP10.phx.gbl...
                > > > > > > I am using IBM's client access software and have setup a DSN[/color][/color][/color]
                which[color=blue][color=green][color=darkred]
                > > > works
                > > > > > via
                > > > > > > VB. When I try using the DSN-less connection string below, I get
                > > > > provider
                > > > > > > cannot be found.
                > > > > > >
                > > > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                > > > > > > news:uej3nEJRDH A.2276@TK2MSFTN GP12.phx.gbl...
                > > > > > > > p.s. Try dsn-less. For IBM's CA drivers, use:
                > > > > > > > Provider=IBMDA4 00.DataSource.1 ;Persist Security[/color][/color][/color]
                Info=False;Data[color=blue][color=green][color=darkred]
                > > > > > > > Source=YourAS40 0Name;
                > > > > > > >
                > > > > > > > Ray at work
                > > > > > > >
                > > > > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                > > > > > > > news:%23X53BBJR DHA.712@TK2MSFT NGP12.phx.gbl.. .
                > > > > > > > > Do you have the DSN setup on the server? Do you have[/color][/color][/color]
                drivers[color=blue][color=green][color=darkred]
                > > > > > installed?
                > > > > > > > >
                > > > > > > > > Ray at work
                > > > > > > > >
                > > > > > > > > "mechweb" <mechweb@yahoo. com> wrote in message
                > > > > > > > > news:eUpqg2IRDH A.2424@tk2msftn gp13.phx.gbl...
                > > > > > > > > > I am trying to connect to a DB2 database on an AS400 via[/color][/color]
                > ASP.[color=green]
                > > On[color=darkred]
                > > > > the
                > > > > > > > > server
                > > > > > > > > > I can connect fine using VB, but keep getting a[/color][/color][/color]
                communcation[color=blue][color=green][color=darkred]
                > > > link
                > > > > > > > failure
                > > > > > > > > > when using the exact same code in ASP. Here is my code (I[/color][/color]
                > know[color=green][color=darkred]
                > > > the
                > > > > > > AS400
                > > > > > > > > > ODBC DSN works ok because I can connect to it from MS[/color][/color][/color]
                Access[color=blue][color=green][color=darkred]
                > > > with
                > > > > no
                > > > > > > > > > problems):
                > > > > > > > > >
                > > > > > > > > > set cnn = server.createob ject("adodb.con nection")
                > > > > > > > > > set rs = server.createob ject("adodb.rec ordset")
                > > > > > > > > > cnn.open "DSN=SYSTEM 2"
                > > > > > > > > >
                > > > > > > > > > Help!
                > > > > > > > > >
                > > > > > > > > >
                > > > > > > > >
                > > > > > > > >
                > > > > > > >
                > > > > > > >
                > > > > > >
                > > > > > >
                > > > > >
                > > > > >
                > > > >
                > > > >
                > > >
                > > >[/color]
                > >
                > >[/color]
                >
                >[/color]


                Comment

                • mechweb

                  #9
                  Re: ASP connection to DB2/AS400

                  In my VB app, I was using ADO 2.6. I changed it to reference ADO 2.0 and it
                  still worked ok. This has to be some kind of IIs or ASP issue, but I am not
                  sure I'll find the answer.

                  "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                  news:ev$14JKRDH A.1564@TK2MSFTN GP12.phx.gbl...[color=blue]
                  > Next suggestion
                  >
                  > [re]Install the latest version of MDAC to verify that your odbcjt32.dll[/color]
                  file[color=blue]
                  > is compatible with CA.
                  >
                  > Ray at work
                  >
                  > "mechweb" <mechweb@yahoo. com> wrote in message
                  > news:eubd5$JRDH A.2224@TK2MSFTN GP12.phx.gbl...[color=green]
                  > > Here is the error, it craps out on the line that contains my cnn.open[/color][/color]
                  (the[color=blue][color=green]
                  > > code is in my first post I think):
                  > >
                  > > Error Type:
                  > > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
                  > > [IBM][Client Access ODBC Driver (32-bit)][DB2/400 SQL]Communication link
                  > > failure. COMM RC=0x3
                  > > /d1main/fieldbulletin_d etail.asp, line 6
                  > >
                  > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                  > > news:%23qwYS9JR DHA.2460@TK2MSF TNGP10.phx.gbl. ..[color=darkred]
                  > > > You're right. It should in this case. Just for the hell of it, post
                  > > > relevant code and the error/line number.
                  > > >
                  > > > Ray at work
                  > > >
                  > > > "mechweb" <mechweb@yahoo. com> wrote in message
                  > > > news:uR8DO7JRDH A.2636@TK2MSFTN GP10.phx.gbl...
                  > > > > The DSN I have been using is a system DSN. In VB, I can get data[/color][/color][/color]
                  back[color=blue]
                  > no[color=green][color=darkred]
                  > > > > problem, but ASP is giving me hell. I have tried about 50 variations[/color][/color]
                  > of[color=green]
                  > > a[color=darkred]
                  > > > > connection string to no avail. I still think ASP should work just[/color][/color][/color]
                  like[color=blue][color=green]
                  > > in[color=darkred]
                  > > > > VB, but it doesn't. Aaarrrrgggghhhh h!!!!!!!
                  > > > >
                  > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                  > > > > news:%23Q5yS3JR DHA.704@tk2msft ngp13.phx.gbl.. .
                  > > > > > Huh, how about that. Alright, with your DSN that you have setup,[/color][/color][/color]
                  is[color=blue][color=green][color=darkred]
                  > > > that
                  > > > > a
                  > > > > > user DSN or system? Try creating a system DSN (and testing it)[/color][/color][/color]
                  and[color=blue][color=green]
                  > > see[color=darkred]
                  > > > if
                  > > > > > that helps.
                  > > > > >
                  > > > > > Ray at work
                  > > > > >
                  > > > > > "mechweb" <mechweb@yahoo. com> wrote in message
                  > > > > > news:OfUZnzJRDH A.3236@TK2MSFTN GP10.phx.gbl...
                  > > > > > > Yes they are, I am actually using my desktop as a dev server.[/color][/color][/color]
                  When[color=blue]
                  > I[color=green][color=darkred]
                  > > > go
                  > > > > > into
                  > > > > > > the ODBC admin I can see IBM Client Access under the drivers[/color][/color][/color]
                  tab.[color=blue][color=green][color=darkred]
                  > > > > > >
                  > > > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                  > > > > > > news:uAnoicJRDH A.2228@tk2msftn gp13.phx.gbl...
                  > > > > > > > Are the IBM DB/2 drivers installed on the server though? It[/color]
                  > > doesn't[color=darkred]
                  > > > > > sound
                  > > > > > > > like it.
                  > > > > > > >
                  > > > > > > > Ray at work
                  > > > > > > >
                  > > > > > > > "mechweb" <mechweb@yahoo. com> wrote in message
                  > > > > > > > news:eO7ZMQJRDH A.2636@TK2MSFTN GP10.phx.gbl...
                  > > > > > > > > I am using IBM's client access software and have setup a DSN[/color]
                  > > which[color=darkred]
                  > > > > > works
                  > > > > > > > via
                  > > > > > > > > VB. When I try using the DSN-less connection string below, I[/color][/color]
                  > get[color=green][color=darkred]
                  > > > > > > provider
                  > > > > > > > > cannot be found.
                  > > > > > > > >
                  > > > > > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                  > > > > > > > > news:uej3nEJRDH A.2276@TK2MSFTN GP12.phx.gbl...
                  > > > > > > > > > p.s. Try dsn-less. For IBM's CA drivers, use:
                  > > > > > > > > > Provider=IBMDA4 00.DataSource.1 ;Persist Security[/color]
                  > > Info=False;Data[color=darkred]
                  > > > > > > > > > Source=YourAS40 0Name;
                  > > > > > > > > >
                  > > > > > > > > > Ray at work
                  > > > > > > > > >
                  > > > > > > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                  > > > > > > > > > news:%23X53BBJR DHA.712@TK2MSFT NGP12.phx.gbl.. .
                  > > > > > > > > > > Do you have the DSN setup on the server? Do you have[/color]
                  > > drivers[color=darkred]
                  > > > > > > > installed?
                  > > > > > > > > > >
                  > > > > > > > > > > Ray at work
                  > > > > > > > > > >
                  > > > > > > > > > > "mechweb" <mechweb@yahoo. com> wrote in message
                  > > > > > > > > > > news:eUpqg2IRDH A.2424@tk2msftn gp13.phx.gbl...
                  > > > > > > > > > > > I am trying to connect to a DB2 database on an AS400[/color][/color][/color]
                  via[color=blue][color=green][color=darkred]
                  > > > ASP.
                  > > > > On
                  > > > > > > the
                  > > > > > > > > > > server
                  > > > > > > > > > > > I can connect fine using VB, but keep getting a[/color]
                  > > communcation[color=darkred]
                  > > > > > link
                  > > > > > > > > > failure
                  > > > > > > > > > > > when using the exact same code in ASP. Here is my code[/color][/color]
                  > (I[color=green][color=darkred]
                  > > > know
                  > > > > > the
                  > > > > > > > > AS400
                  > > > > > > > > > > > ODBC DSN works ok because I can connect to it from MS[/color]
                  > > Access[color=darkred]
                  > > > > > with
                  > > > > > > no
                  > > > > > > > > > > > problems):
                  > > > > > > > > > > >
                  > > > > > > > > > > > set cnn = server.createob ject("adodb.con nection")
                  > > > > > > > > > > > set rs = server.createob ject("adodb.rec ordset")
                  > > > > > > > > > > > cnn.open "DSN=SYSTEM 2"
                  > > > > > > > > > > >
                  > > > > > > > > > > > Help!
                  > > > > > > > > > > >
                  > > > > > > > > > > >
                  > > > > > > > > > >
                  > > > > > > > > > >
                  > > > > > > > > >
                  > > > > > > > > >
                  > > > > > > > >
                  > > > > > > > >
                  > > > > > > >
                  > > > > > > >
                  > > > > > >
                  > > > > > >
                  > > > > >
                  > > > > >
                  > > > >
                  > > > >
                  > > >
                  > > >[/color]
                  > >
                  > >[/color]
                  >
                  >[/color]


                  Comment

                  • Ray at

                    #10
                    Re: ASP connection to DB2/AS400

                    I wouldn't be so sure that it's an ASP issue. IIRC, the comm link failures
                    always have to do with MDAC. Either that, or the as-database daemon isn't
                    running... STRHOSTSVR *ALL.

                    Ray at work

                    "mechweb" <mechweb@yahoo. com> wrote in message
                    news:O$MtHVLRDH A.2204@TK2MSFTN GP12.phx.gbl...[color=blue]
                    > In my VB app, I was using ADO 2.6. I changed it to reference ADO 2.0 and[/color]
                    it[color=blue]
                    > still worked ok. This has to be some kind of IIs or ASP issue, but I am[/color]
                    not[color=blue]
                    > sure I'll find the answer.
                    >
                    > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                    > news:ev$14JKRDH A.1564@TK2MSFTN GP12.phx.gbl...[color=green]
                    > > Next suggestion
                    > >
                    > > [re]Install the latest version of MDAC to verify that your odbcjt32.dll[/color]
                    > file[color=green]
                    > > is compatible with CA.
                    > >
                    > > Ray at work
                    > >
                    > > "mechweb" <mechweb@yahoo. com> wrote in message
                    > > news:eubd5$JRDH A.2224@TK2MSFTN GP12.phx.gbl...[color=darkred]
                    > > > Here is the error, it craps out on the line that contains my cnn.open[/color][/color]
                    > (the[color=green][color=darkred]
                    > > > code is in my first post I think):
                    > > >
                    > > > Error Type:
                    > > > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
                    > > > [IBM][Client Access ODBC Driver (32-bit)][DB2/400 SQL]Communication[/color][/color][/color]
                    link[color=blue][color=green][color=darkred]
                    > > > failure. COMM RC=0x3
                    > > > /d1main/fieldbulletin_d etail.asp, line 6
                    > > >
                    > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                    > > > news:%23qwYS9JR DHA.2460@TK2MSF TNGP10.phx.gbl. ..
                    > > > > You're right. It should in this case. Just for the hell of it,[/color][/color][/color]
                    post[color=blue][color=green][color=darkred]
                    > > > > relevant code and the error/line number.
                    > > > >
                    > > > > Ray at work
                    > > > >
                    > > > > "mechweb" <mechweb@yahoo. com> wrote in message
                    > > > > news:uR8DO7JRDH A.2636@TK2MSFTN GP10.phx.gbl...
                    > > > > > The DSN I have been using is a system DSN. In VB, I can get data[/color][/color]
                    > back[color=green]
                    > > no[color=darkred]
                    > > > > > problem, but ASP is giving me hell. I have tried about 50[/color][/color][/color]
                    variations[color=blue][color=green]
                    > > of[color=darkred]
                    > > > a
                    > > > > > connection string to no avail. I still think ASP should work just[/color][/color]
                    > like[color=green][color=darkred]
                    > > > in
                    > > > > > VB, but it doesn't. Aaarrrrgggghhhh h!!!!!!!
                    > > > > >
                    > > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                    > > > > > news:%23Q5yS3JR DHA.704@tk2msft ngp13.phx.gbl.. .
                    > > > > > > Huh, how about that. Alright, with your DSN that you have[/color][/color][/color]
                    setup,[color=blue]
                    > is[color=green][color=darkred]
                    > > > > that
                    > > > > > a
                    > > > > > > user DSN or system? Try creating a system DSN (and testing it)[/color][/color]
                    > and[color=green][color=darkred]
                    > > > see
                    > > > > if
                    > > > > > > that helps.
                    > > > > > >
                    > > > > > > Ray at work
                    > > > > > >
                    > > > > > > "mechweb" <mechweb@yahoo. com> wrote in message
                    > > > > > > news:OfUZnzJRDH A.3236@TK2MSFTN GP10.phx.gbl...
                    > > > > > > > Yes they are, I am actually using my desktop as a dev server.[/color][/color]
                    > When[color=green]
                    > > I[color=darkred]
                    > > > > go
                    > > > > > > into
                    > > > > > > > the ODBC admin I can see IBM Client Access under the drivers[/color][/color]
                    > tab.[color=green][color=darkred]
                    > > > > > > >
                    > > > > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                    > > > > > > > news:uAnoicJRDH A.2228@tk2msftn gp13.phx.gbl...
                    > > > > > > > > Are the IBM DB/2 drivers installed on the server though? It
                    > > > doesn't
                    > > > > > > sound
                    > > > > > > > > like it.
                    > > > > > > > >
                    > > > > > > > > Ray at work
                    > > > > > > > >
                    > > > > > > > > "mechweb" <mechweb@yahoo. com> wrote in message
                    > > > > > > > > news:eO7ZMQJRDH A.2636@TK2MSFTN GP10.phx.gbl...
                    > > > > > > > > > I am using IBM's client access software and have setup a[/color][/color][/color]
                    DSN[color=blue][color=green][color=darkred]
                    > > > which
                    > > > > > > works
                    > > > > > > > > via
                    > > > > > > > > > VB. When I try using the DSN-less connection string below,[/color][/color][/color]
                    I[color=blue][color=green]
                    > > get[color=darkred]
                    > > > > > > > provider
                    > > > > > > > > > cannot be found.
                    > > > > > > > > >
                    > > > > > > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                    > > > > > > > > > news:uej3nEJRDH A.2276@TK2MSFTN GP12.phx.gbl...
                    > > > > > > > > > > p.s. Try dsn-less. For IBM's CA drivers, use:
                    > > > > > > > > > > Provider=IBMDA4 00.DataSource.1 ;Persist Security
                    > > > Info=False;Data
                    > > > > > > > > > > Source=YourAS40 0Name;
                    > > > > > > > > > >
                    > > > > > > > > > > Ray at work
                    > > > > > > > > > >
                    > > > > > > > > > > "Ray at <%=sLocation% >" <ask@me.forit > wrote in message
                    > > > > > > > > > > news:%23X53BBJR DHA.712@TK2MSFT NGP12.phx.gbl.. .
                    > > > > > > > > > > > Do you have the DSN setup on the server? Do you have
                    > > > drivers
                    > > > > > > > > installed?
                    > > > > > > > > > > >
                    > > > > > > > > > > > Ray at work
                    > > > > > > > > > > >
                    > > > > > > > > > > > "mechweb" <mechweb@yahoo. com> wrote in message
                    > > > > > > > > > > > news:eUpqg2IRDH A.2424@tk2msftn gp13.phx.gbl...
                    > > > > > > > > > > > > I am trying to connect to a DB2 database on an AS400[/color][/color]
                    > via[color=green][color=darkred]
                    > > > > ASP.
                    > > > > > On
                    > > > > > > > the
                    > > > > > > > > > > > server
                    > > > > > > > > > > > > I can connect fine using VB, but keep getting a
                    > > > communcation
                    > > > > > > link
                    > > > > > > > > > > failure
                    > > > > > > > > > > > > when using the exact same code in ASP. Here is my[/color][/color][/color]
                    code[color=blue][color=green]
                    > > (I[color=darkred]
                    > > > > know
                    > > > > > > the
                    > > > > > > > > > AS400
                    > > > > > > > > > > > > ODBC DSN works ok because I can connect to it from[/color][/color][/color]
                    MS[color=blue][color=green][color=darkred]
                    > > > Access
                    > > > > > > with
                    > > > > > > > no
                    > > > > > > > > > > > > problems):
                    > > > > > > > > > > > >
                    > > > > > > > > > > > > set cnn = server.createob ject("adodb.con nection")
                    > > > > > > > > > > > > set rs = server.createob ject("adodb.rec ordset")
                    > > > > > > > > > > > > cnn.open "DSN=SYSTEM 2"
                    > > > > > > > > > > > >
                    > > > > > > > > > > > > Help!
                    > > > > > > > > > > > >
                    > > > > > > > > > > > >
                    > > > > > > > > > > >
                    > > > > > > > > > > >
                    > > > > > > > > > >
                    > > > > > > > > > >
                    > > > > > > > > >
                    > > > > > > > > >
                    > > > > > > > >
                    > > > > > > > >
                    > > > > > > >
                    > > > > > > >
                    > > > > > >
                    > > > > > >
                    > > > > >
                    > > > > >
                    > > > >
                    > > > >
                    > > >
                    > > >[/color]
                    > >
                    > >[/color]
                    >
                    >[/color]


                    Comment

                    Working...