473,691 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ADO Constants

CJM
I'm trying to transfer an intranet app from one server to another. I'm
having a problem with the ADO constants on the destination server.

Our intranet site runs on the server.

In a virtual directory, I have a seperate application that is accessible
from the intranet.

I have the following in the global.asa in the virtual directory:

<!--METADATA TYPE="typelib"
UUID="2A75196C-D9EB-4129-B803-931327F72D5C"
NAME="Microsoft ActiveX Data Objects 2.8 Library"-->

This usually allows me to refer to the ADO constants, e.g.

Set rsLoc = oConn.Execute (sSQL, iAffected, adCmdText)

However, in this case, IIS is complaining... Variable is undefined:
'adCmdText'

This is a new (clean) server, so I'm wondering if there is some kind of
confirguration issue...

Any ideas?

Chris

PS. I originally had the 2.6 typlib listed, which didnt work either.
Jul 19 '05 #1
11 4932
You have two options:

a) use the UUID, which means you need to know the MDAC version installed on
the machine (you need to look in the registry to be sure)

b) use the path to the typelib:
<!-- METADATA TYPE="TypeLib" FILE="C:\Progra m Files\Common
Files\system\ad o\msado15.dll" -->
however, you need to know the drive letter (eg c:) that the boot partition
is. You can experiment (since there are only 24 possible letters until you
get the right one)

Cheers
Ken
"CJM" <cj*****@yahoo. co.uk> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
: I'm trying to transfer an intranet app from one server to another. I'm
: having a problem with the ADO constants on the destination server.
:
: Our intranet site runs on the server.
:
: In a virtual directory, I have a seperate application that is accessible
: from the intranet.
:
: I have the following in the global.asa in the virtual directory:
:
: <!--METADATA TYPE="typelib"
: UUID="2A75196C-D9EB-4129-B803-931327F72D5C"
: NAME="Microsoft ActiveX Data Objects 2.8 Library"-->
:
: This usually allows me to refer to the ADO constants, e.g.
:
: Set rsLoc = oConn.Execute (sSQL, iAffected, adCmdText)
:
: However, in this case, IIS is complaining... Variable is undefined:
: 'adCmdText'
:
: This is a new (clean) server, so I'm wondering if there is some kind of
: confirguration issue...
:
: Any ideas?
:
: Chris
:
: PS. I originally had the 2.6 typlib listed, which didnt work either.
:
:
Jul 19 '05 #2
Are you sure ADO 2.8 is installed?

Might want to check.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"CJM" <cj*****@yahoo. co.uk> wrote in message
news:#o******** ******@TK2MSFTN GP09.phx.gbl...
I'm trying to transfer an intranet app from one server to another. I'm
having a problem with the ADO constants on the destination server.

Our intranet site runs on the server.

In a virtual directory, I have a seperate application that is accessible
from the intranet.

I have the following in the global.asa in the virtual directory:

<!--METADATA TYPE="typelib"
UUID="2A75196C-D9EB-4129-B803-931327F72D5C"
NAME="Microsoft ActiveX Data Objects 2.8 Library"-->

This usually allows me to refer to the ADO constants, e.g.

Set rsLoc = oConn.Execute (sSQL, iAffected, adCmdText)

However, in this case, IIS is complaining... Variable is undefined:
'adCmdText'

This is a new (clean) server, so I'm wondering if there is some kind of
confirguration issue...

Any ideas?

Chris

PS. I originally had the 2.6 typlib listed, which didnt work either.

Jul 19 '05 #3
CJM

"Ken Schaefer" <ke*******@THIS adOpenStatic.co m> wrote in message
news:uH******** ******@tk2msftn gp13.phx.gbl...
You have two options:

a) use the UUID, which means you need to know the MDAC version installed on the machine (you need to look in the registry to be sure)

b) use the path to the typelib:
<!-- METADATA TYPE="TypeLib" FILE="C:\Progra m Files\Common
Files\system\ad o\msado15.dll" -->
however, you need to know the drive letter (eg c:) that the boot partition
is. You can experiment (since there are only 24 possible letters until you
get the right one)

Cheers
Ken


Ken,

I checked in the registry and updated the UUID with the ProgID listed in the
registry. it didnt work.

So then I tried the 'file=' route, but had no luck with that either...

However, I have just realised something significant: The main intranet menu
is DB-driven - it is using the typelib specified in the main global.asa
file, and it works fine.... So why doesnt the application in the virtual
directory do the same?

Cheers

Chris
Jul 19 '05 #4
CJM
Aaron,

Yes I've checked.

Apart from the fact that the main intranet pages work, I've also run the
component checker. MDAC 2.8 RTM is installed.

Any other ideas?

This is running on Windows Server 2003 - previously I've worked with
IIS5/5.1.... I wonder if IIS6 makes a difference...

Chris

"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:uc******** ******@TK2MSFTN GP10.phx.gbl...
Are you sure ADO 2.8 is installed?

Might want to check.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"CJM" <cj*****@yahoo. co.uk> wrote in message
news:#o******** ******@TK2MSFTN GP09.phx.gbl...
I'm trying to transfer an intranet app from one server to another. I'm
having a problem with the ADO constants on the destination server.

Our intranet site runs on the server.

In a virtual directory, I have a seperate application that is accessible
from the intranet.

I have the following in the global.asa in the virtual directory:

<!--METADATA TYPE="typelib"
UUID="2A75196C-D9EB-4129-B803-931327F72D5C"
NAME="Microsoft ActiveX Data Objects 2.8 Library"-->

This usually allows me to refer to the ADO constants, e.g.

Set rsLoc = oConn.Execute (sSQL, iAffected, adCmdText)

However, in this case, IIS is complaining... Variable is undefined:
'adCmdText'

This is a new (clean) server, so I'm wondering if there is some kind of
confirguration issue...

Any ideas?

Chris

PS. I originally had the 2.6 typlib listed, which didnt work either.


Jul 19 '05 #5
Make sure you have a global.asa file in each ASP application or subweb root.

--
Cheers!

Ryan N.
---------------------------------
Funny...this worked yesterday....
"CJM" <cj*****@yahoo. co.uk> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I'm trying to transfer an intranet app from one server to another. I'm
having a problem with the ADO constants on the destination server.

Our intranet site runs on the server.

In a virtual directory, I have a seperate application that is accessible
from the intranet.

I have the following in the global.asa in the virtual directory:

<!--METADATA TYPE="typelib"
UUID="2A75196C-D9EB-4129-B803-931327F72D5C"
NAME="Microsoft ActiveX Data Objects 2.8 Library"-->

This usually allows me to refer to the ADO constants, e.g.

Set rsLoc = oConn.Execute (sSQL, iAffected, adCmdText)

However, in this case, IIS is complaining... Variable is undefined:
'adCmdText'

This is a new (clean) server, so I'm wondering if there is some kind of
confirguration issue...

Any ideas?

Chris

PS. I originally had the 2.6 typlib listed, which didnt work either.

Jul 19 '05 #6
CJM
As per usual, the problem existed between chair and keyboard..!

My application is actually in a subdir of the intranet content area. This in
itself was a virtual directory.
However, my application directory was NOT a virtual directory, therefore the
global.asa would surely be ignored.

The app directory is now a pukka virtual directory! The application works...

The only think puzzling me now is how/why the app was able to pick up the
connection string which was defined in an application variable in the same
Global.asa??

Chris
Jul 19 '05 #7
Maybe the connection string is also defined in the ROOT's global.asa file.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"CJM" <cj*****@yahoo. co.uk> wrote in message
news:O7******** ******@TK2MSFTN GP10.phx.gbl...
As per usual, the problem existed between chair and keyboard..!

My application is actually in a subdir of the intranet content area. This in itself was a virtual directory.
However, my application directory was NOT a virtual directory, therefore the global.asa would surely be ignored.

The app directory is now a pukka virtual directory! The application works...
The only think puzzling me now is how/why the app was able to pick up the
connection string which was defined in an application variable in the same
Global.asa??

Chris

Jul 19 '05 #8
CJM
It's not in the site root global.asa, and the parent virtual dir doesnt have
one...

Curious...
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:OC******** ******@TK2MSFTN GP12.phx.gbl...
Maybe the connection string is also defined in the ROOT's global.asa file.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

Jul 19 '05 #9
> It's not in the site root global.asa, and the parent virtual dir doesnt
have
one...

Curious...


Sorry, without being able to reproduce, I guess you've discovered one of the
world's greatest mysteries.

<shrug>
Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1869
by: Raymond Hettinger | last post by:
Comments are invited on the following proposed PEP. Raymond Hettinger ------------------------------------------------------- PEP: 329
0
3060
by: David W. Fenton | last post by:
Today I was working on a hideous old app that I created a long time ago that does a lot of showing/hiding/resizing of fields on one of the forms. I had used constants to store reference values for many of the top/height/left settings. I noticed that some of the constants were defined by using other constant values, and I was impressed that VBA could do that. Here's an example: Const row1Top = 1.0208 * 1440 ' top of first row Const...
13
6084
by: Andrew | last post by:
I use conditional compiler constants, set through the VBA IDE in Tools, <projectname> Properties, that I refer to throughout my code to control which code is used during development, and which during production. Usually, this only wraps code used to control quitting the whole app versus just shutting a form, but it can also control many other things. However, as part of the build before delivering an update, I have to remember to...
4
51175
by: Amadelle | last post by:
Hi all and thanks again in advance, What is the best way of defining global constants in a C# application? (A windows application with no windows forms - basically a set of classes). Would it be a wise idea to create a clsCommonApp and let all other classes to be derived from that class? and define all constants in that base class? Any other suggestions are more than welcome. (BTW this is not for one constant, I have multiple...
8
2883
by: Marty | last post by:
Hi, I'm new to C#, I used to code in VB.NET. Where is the best place to declare all my constants and global objects in my C# project to have them accessible globally? I have an event logger class that I want its instance to be accessible from any other classe in the project. There is also a bunch of constants that I want to be public for the
34
3369
by: newsposter0123 | last post by:
The code block below initialized a r/w variable (usually .bss) to the value of pi. One, of many, problem is any linked compilation unit may change the global variable. Adjusting // rodata const long double const_pi=0.0; lines to // rodata
6
3123
by: PC | last post by:
Gentlesofts, Forgive me. I'm an abject newbie in your world, using VB 2005 with the dot-Net wonderfulness. So, I'm writing a wonderful class or two to interface with a solemnly ancient database. In times recently past, I would have done this with Borland Delphi. So, that's my perspective and I have my old Delphi code to crib from. That seems good.
17
2067
by: Neil Cerutti | last post by:
The Glk API (which I'm implementing in native Python code) defines 120 or so constants that users must use. The constants already have fairly long names, e.g., gestalt_Version, evtype_Timer, keycode_PageDown. Calls to Glk functions are thus ugly and tedious. scriptref = glk.fileref_create_by_prompt( glk.fileusage_Transcript | glk.fileusage_TextMode, glk.filemode_WriteAppend, 0)
2
2512
by: Leslie Sanford | last post by:
I want to define a set of floating point constants using templates insteand of macros. I'd like to determine whether these constants are floats or doubles at compile time. In my header file, I have this: template<bool DoublePrecision> struct Constants { typedef double SampleType; static const double pi;
54
3596
by: shuisheng | last post by:
Dear All, I am always confused in using constants in multiple files. For global constants, I got some clues from http://msdn.microsoft.com/en-us/library/0d45ty2d(VS.80).aspx So in header file writing: const double PI = 3.14; Every time using it, include the header file.
0
9079
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8951
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8791
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8795
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7624
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5813
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4322
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2966
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
1954
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.