Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > adUseServer Constant Undefined

Reply
Thread Tools

adUseServer Constant Undefined

 
 
Wayne Wengert
Guest
Posts: n/a
 
      09-14-2003
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
http://www.velocityreviews.com/forums/(E-Mail Removed)


 
Reply With Quote
 
 
 
 
Curt_C [MVP]
Guest
Posts: n/a
 
      09-14-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
> (E-Mail Removed)
>
>



 
Reply With Quote
 
 
 
 
dlbjr
Guest
Posts: n/a
 
      09-14-2003
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.


 
Reply With Quote
 
Wayne Wengert
Guest
Posts: n/a
 
      09-14-2003
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:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> > (E-Mail Removed)
> >
> >

>
>



 
Reply With Quote
 
Bob Barrows
Guest
Posts: n/a
 
      09-14-2003
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


 
Reply With Quote
 
Wayne Wengert
Guest
Posts: n/a
 
      09-15-2003
Ah ha...

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

Wayne

"Bob Barrows" <(E-Mail Removed)> wrote in message
news:uWp$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
MSFT
Guest
Posts: n/a
 
      09-15-2003
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.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"error C2057: expected constant expression", "error C2466: cannot allocate an array of constant size 0". Why doesn't my simple program work??? hn.ft.pris@gmail.com C++ 13 01-22-2007 02:03 PM
pointers to constant characters and constant pointers to characters sam_cit@yahoo.co.in C Programming 4 12-14-2006 11:10 PM
len(var) is [CONSTANT] equal to len(var) == [CONSTANT]? Tor Erik Soenvisen Python 14 11-23-2006 09:57 PM
"Non-constant" constant can't be used as template argument Martin Magnusson C++ 2 10-08-2004 08:41 AM
Understanding How To Use #ifdef Constant #define Constant Sequence In Multible Files Christopher M. Lusardi C++ 1 09-02-2004 07:43 AM



Advertisments