469,311 Members | 2,514 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,311 developers. It's quick & easy.

adUseServer Constant Undefined

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
wa***@wengert.org
Jul 19 '05 #1
6 5017
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" <wa***@wengert.org> wrote in message
news:e6**************@TK2MSFTNGP11.phx.gbl...
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
wa***@wengert.org

Jul 19 '05 #2
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.
Jul 19 '05 #3
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:eM*************@TK2MSFTNGP12.phx.gbl...
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" <wa***@wengert.org> wrote in message
news:e6**************@TK2MSFTNGP11.phx.gbl...
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
wa***@wengert.org


Jul 19 '05 #4
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
Jul 19 '05 #5
Ah ha...

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

Wayne

"Bob Barrows" <re*******@yahoo.com> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
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

Jul 19 '05 #6
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.)

Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Phil Powell | last post: by
3 posts views Thread by bp | last post: by
3 posts views Thread by Old Admiral | last post: by
7 posts views Thread by Thomas L. | last post: by
6 posts views Thread by mark_galeck_spam_magnet | last post: by
16 posts views Thread by Francois Grieu | last post: by
20 posts views Thread by karthikbalaguru | last post: by
22 posts views Thread by blargg | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.