not creating ADODB connection

Discussion in 'ASP General' started by Me, Sep 29, 2006.

  1. Me

    Me Guest

    I have the following lines in my asp, but somehow
    it isn't working, can someone help me resolve it?

    ---Comm = "DSN=HRPROD"
    Server="MYSERVER"
    Response.Write ("Server Name ") & Server
    Set Conn = Server.CreateObject("ADODB.Connection")
    Response.Write ("After Conn ")
    Conn.Open Comm

    when I execute this, I do get valid response
    Server Name MYSERVER

    But I don't see the 2nd response "After Conn "
    as a result I am unable to see any output after that.

    Thanks for your help!
    -Me
     
    Me, Sep 29, 2006
    #1
    1. Advertising

  2. Me wrote:
    > I have the following lines in my asp, but somehow
    > it isn't working, can someone help me resolve it?
    >
    > ---Comm = "DSN=HRPROD"
    > Server="MYSERVER"
    > Response.Write ("Server Name ") & Server
    > Set Conn = Server.CreateObject("ADODB.Connection")
    > Response.Write ("After Conn ")
    > Conn.Open Comm
    >
    > when I execute this, I do get valid response
    > Server Name MYSERVER
    >
    > But I don't see the 2nd response "After Conn "
    > as a result I am unable to see any output after that.
    >

    not even an error message?? Do you have "On error Resume Next" before
    this code snip? if so, comment it out and try running the page so you
    can see the error.

    Beyond that, we cannot help because you have failed to provide the
    database type (and version) to which you are attempting to connect.

    For self-help see: http://www.aspfaq.com/show.asp?id=2126



    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Sep 29, 2006
    #2
    1. Advertising

  3. Me

    Me Guest

    Hi Bob,

    Thanks for quick response. It doesn't display any error message.
    No, I don't have on error clause before this.

    I am using similar code in another page and its working fine. I just copied it
    from the other page into this one and it doesn't work.
    The other code is also on the same server. That's why I don't think
    there is anything wrong with the way I have specified the connection.
    But can't think why it shouldn't work.

    Here is the complete string for your info ...

    Comm = "DSN=MYDSN"
    Server="MYSERVER"
    Response.Write ("Server Name ") & Server
    Set Conn = Server.CreateObject("ADODB.Connection")
    Response.Write ("Connection ")
    Conn.Open Comm

    Please let me know if you have ideas.


    "Bob Barrows [MVP]" wrote:

    > Me wrote:
    > > I have the following lines in my asp, but somehow
    > > it isn't working, can someone help me resolve it?
    > >
    > > ---Comm = "DSN=HRPROD"
    > > Server="MYSERVER"
    > > Response.Write ("Server Name ") & Server
    > > Set Conn = Server.CreateObject("ADODB.Connection")
    > > Response.Write ("After Conn ")
    > > Conn.Open Comm
    > >
    > > when I execute this, I do get valid response
    > > Server Name MYSERVER
    > >
    > > But I don't see the 2nd response "After Conn "
    > > as a result I am unable to see any output after that.
    > >

    > not even an error message?? Do you have "On error Resume Next" before
    > this code snip? if so, comment it out and try running the page so you
    > can see the error.
    >
    > Beyond that, we cannot help because you have failed to provide the
    > database type (and version) to which you are attempting to connect.
    >
    > For self-help see: http://www.aspfaq.com/show.asp?id=2126
    >
    >
    >
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >
    >
     
    Me, Sep 29, 2006
    #3
  4. Me wrote:
    > Hi Bob,
    >
    > Thanks for quick response. It doesn't display any error message.
    > No, I don't have on error clause before this.
    >
    > I am using similar code in another page and its working fine. I just
    > copied it from the other page into this one and it doesn't work.
    > The other code is also on the same server. That's why I don't think
    > there is anything wrong with the way I have specified the connection.
    > But can't think why it shouldn't work.
    >
    > Here is the complete string for your info ...
    >
    > Comm = "DSN=MYDSN"
    > Server="MYSERVER"
    > Response.Write ("Server Name ") & Server
    > Set Conn = Server.CreateObject("ADODB.Connection")
    > Response.Write ("Connection ")
    > Conn.Open Comm
    >
    > Please let me know if you have ideas.
    >


    Based on this, I have nothing to add.
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Sep 29, 2006
    #4
    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. PJ
    Replies:
    1
    Views:
    1,800
    George Ter-Saakov
    Oct 30, 2003
  2. Joe Befumo

    Type 'ADODB.Connection' is not defined.

    Joe Befumo, Feb 19, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    6,919
    Joe Befumo
    Feb 19, 2006
  3. msnews.microsoft.com
    Replies:
    2
    Views:
    700
    Luke Xu
    Oct 9, 2007
  4. wowfed
    Replies:
    1
    Views:
    1,470
    Mark McGinty
    Apr 18, 2010
  5. Jesper Quorning
    Replies:
    0
    Views:
    708
    Jesper Quorning
    Feb 29, 2012
Loading...

Share This Page