473,326 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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 5211
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Phil Powell | last post by:
class NicknameVerifier { function NicknameVerifier() {} function isValid() { if ($fileID) { $content = fread($fileID, HTMLRetriever::MAX_URL_SIZE); fclose($fileID); if ($content)...
20
by: CoolPint | last post by:
While I was reading about const_cast, I got curious and wanted to know if I could modify a constant variable through a pointer which has been "const_cast"ed. Since the pointer would be pointing to...
3
by: bp | last post by:
Hi, Could someone to tell me what I'm doing wrong? I'm using gcc version 3.3.4 and ld version 2.15.90.0.3 20040415 the linker message is: .../obj/classOpenAreaForm.o(.text+0x211): In...
3
by: Old Admiral | last post by:
Gentlemen: Is this UB? #include <iostream> const int& f() {
7
by: Thomas L. | last post by:
Hi all, Does a "NULL constant function" exist in C? I mean: I am searching for a C language constant which would be something like a function but which would be translated by a compiler into...
6
by: mark_galeck_spam_magnet | last post by:
Hello, K&R say about the constant expression after #if: "The resulting constant expression is restricted: it must be integral (...)" Clearly, the expression 1 < FOO if FOO is undefined, is...
16
by: Francois Grieu | last post by:
Hello, does the expression (0x41u*0x201)&0x7FFF yield the well defined value 0x0241, or is the behaviour undefined? In other words: what's the type of the product on an unsigned by an int,...
20
by: karthikbalaguru | last post by:
Hi, String constant being modifiable in C++ but, not modifiable in C. that is, In C++, the following example output will be "Mplusplus" char *str1 = "Cplusplus"; *str1 = 'M'; In C, the above...
22
by: blargg | last post by:
Does ~0 yield undefined behavior? C++03 section 5 paragraph 5 seems to suggest so: The description of unary ~ (C++03 section 5.3.1 paragraph 8): But perhaps "one's complement" means the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.