adUseServer Constant Undefined

Discussion in 'ASP General' started by Wayne Wengert, Sep 14, 2003.

  1. I have an ASP page in which I reference quite a few ADO constants such as
    adOpenStatic, adLockReadOnly and they work fine but a reference to
    adUseServer comes up as undefined?

    I have a typelib definition in that page:

    <!--METADATA TYPE="typelib" uuid="00000205-0000-0010-8000-00AA006D2EA4" -->

    For the time being I used the constant 2 to replace that reference - I hope
    that is correct?

    Any ideas on why that constant remains undefined?

    --
    ------------------------------------
    Wayne Wengert
     
    Wayne Wengert, Sep 14, 2003
    #1
    1. Advertising

  2. Wayne  Wengert

    Curt_C [MVP] Guest

    do an INCLUDE of the adovbs.inc file


    --
    ----------------------------------------------------------
    Curt Christianson (Software_AT_Darkfalz.Com)
    Owner/Lead Designer, DF-Software
    http://www.Darkfalz.com
    ---------------------------------------------------------
    ...Offering free scripts & code snippits for everyone...
    ---------------------------------------------------------


    "Wayne Wengert" <> wrote in message
    news:...
    > I have an ASP page in which I reference quite a few ADO constants such as
    > adOpenStatic, adLockReadOnly and they work fine but a reference to
    > adUseServer comes up as undefined?
    >
    > I have a typelib definition in that page:
    >
    > <!--METADATA TYPE="typelib"

    uuid="00000205-0000-0010-8000-00AA006D2EA4" -->
    >
    > For the time being I used the constant 2 to replace that reference - I

    hope
    > that is correct?
    >
    > Any ideas on why that constant remains undefined?
    >
    > --
    > ------------------------------------
    > Wayne Wengert
    >
    >
    >
     
    Curt_C [MVP], Sep 14, 2003
    #2
    1. Advertising

  3. Wayne  Wengert

    dlbjr Guest

    If Using Stored Procs:

    Try to add SET NOCOUNT ON as a very first statement inside each SP.
    It may fix your problem with returning result and improve performance as
    well.

    --
    dlbjr

    Unambit from meager knowledge of inane others,
    engender uncharted sagacity.
     
    dlbjr, Sep 14, 2003
    #3
  4. But that is what the typelib reference is supposed to take care of isn't it?
    All the other constants work?

    Wayne

    "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    news:...
    > do an INCLUDE of the adovbs.inc file
    >
    >
    > --
    > ----------------------------------------------------------
    > Curt Christianson (Software_AT_Darkfalz.Com)
    > Owner/Lead Designer, DF-Software
    > http://www.Darkfalz.com
    > ---------------------------------------------------------
    > ..Offering free scripts & code snippits for everyone...
    > ---------------------------------------------------------
    >
    >
    > "Wayne Wengert" <> wrote in message
    > news:...
    > > I have an ASP page in which I reference quite a few ADO constants such

    as
    > > adOpenStatic, adLockReadOnly and they work fine but a reference to
    > > adUseServer comes up as undefined?
    > >
    > > I have a typelib definition in that page:
    > >
    > > <!--METADATA TYPE="typelib"

    > uuid="00000205-0000-0010-8000-00AA006D2EA4" -->
    > >
    > > For the time being I used the constant 2 to replace that reference - I

    > hope
    > > that is correct?
    > >
    > > Any ideas on why that constant remains undefined?
    > >
    > > --
    > > ------------------------------------
    > > Wayne Wengert
    > >
    > >
    > >

    >
    >
     
    Wayne Wengert, Sep 14, 2003
    #4
  5. Wayne  Wengert

    Bob Barrows Guest

    Wayne Wengert wrote:
    > But that is what the typelib reference is supposed to take care of
    > isn't it? All the other constants work?
    >

    This usually means you referenced the wrong version of the type library. See
    here for the version-specific references:
    http://www.aspfaq.com/show.asp?id=2112

    You can determine the ADO version by checking the Version property of the
    connection object.

    HTH,
    Bob Barrows
     
    Bob Barrows, Sep 14, 2003
    #5
  6. Ah ha...

    I suspect that is it - I'll pursue that.

    Wayne

    "Bob Barrows" <> wrote in message
    news:uWp$...
    > Wayne Wengert wrote:
    > > But that is what the typelib reference is supposed to take care of
    > > isn't it? All the other constants work?
    > >

    > This usually means you referenced the wrong version of the type library.

    See
    > here for the version-specific references:
    > http://www.aspfaq.com/show.asp?id=2112
    >
    > You can determine the ADO version by checking the Version property of the
    > connection object.
    >
    > HTH,
    > Bob Barrows
    >
    >
     
    Wayne Wengert, Sep 15, 2003
    #6
  7. Wayne  Wengert

    MSFT Guest

    Hi Wayne,

    What is the version of MDAC installed on your computer? I have MDAC 2.8
    installed, and following code seems to work:

    <%@ Language=VBScript %>

    <!--METADATA TYPE="typelib" uuid="00000205-0000-0010-8000-00AA006D2EA4" -->

    <html>
    <head>
    <title>Test Page</title>

    </head>
    <body >

    <%



    dim re

    set re=server.CreateObject("adodb.recordset")

    re.CursorLocation = adUseServer

    re.CursorType =adOpenStatic

    %>


    </body>
    </html>

    By the way, you are right that the value for adUseServer is 2.

    Luke
    Microsoft Online Partner Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    MSFT, Sep 15, 2003
    #7
    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. Christopher M. Lusardi
    Replies:
    1
    Views:
    4,094
  2. Martin Magnusson
    Replies:
    2
    Views:
    508
    John Harrison
    Oct 8, 2004
  3. Tor Erik Soenvisen
    Replies:
    14
    Views:
    564
    Tim Roberts
    Nov 23, 2006
  4. Replies:
    4
    Views:
    339
    Keith Thompson
    Dec 14, 2006
  5. Replies:
    13
    Views:
    12,933
    Kai-Uwe Bux
    Jan 22, 2007
Loading...

Share This Page