Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ADO Constants

Reply
Thread Tools

ADO Constants

 
 
CJM
Guest
Posts: n/a
 
      02-11-2004
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.


 
Reply With Quote
 
 
 
 
Ken Schaefer
Guest
Posts: n/a
 
      02-11-2004
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:\Program Files\Common
Files\system\ado\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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
: 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.
:
:


 
Reply With Quote
 
 
 
 
Aaron Bertrand - MVP
Guest
Posts: n/a
 
      02-11-2004
Are you sure ADO 2.8 is installed?

Might want to check.

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




"CJM" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
CJM
Guest
Posts: n/a
 
      02-11-2004

"Ken Schaefer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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:\Program Files\Common
> Files\system\ado\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


 
Reply With Quote
 
CJM
Guest
Posts: n/a
 
      02-11-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Are you sure ADO 2.8 is installed?
>
> Might want to check.
>
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>
>
>
>
> "CJM" <(E-Mail Removed)> wrote in message
> news:#(E-Mail Removed)...
> > 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.
> >
> >

>
>



 
Reply With Quote
 
Ryan N.
Guest
Posts: n/a
 
      02-11-2004
Make sure you have a global.asa file in each ASP application or subweb root.

--
Cheers!

Ryan N.
---------------------------------
Funny...this worked yesterday....
"CJM" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
CJM
Guest
Posts: n/a
 
      02-11-2004
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


 
Reply With Quote
 
Aaron Bertrand - MVP
Guest
Posts: n/a
 
      02-11-2004
Maybe the connection string is also defined in the ROOT's global.asa file.

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




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



 
Reply With Quote
 
CJM
Guest
Posts: n/a
 
      02-11-2004
It's not in the site root global.asa, and the parent virtual dir doesnt have
one...

Curious...


"Aaron Bertrand - MVP" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Maybe the connection string is also defined in the ROOT's global.asa file.
>
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>



 
Reply With Quote
 
Aaron Bertrand - MVP
Guest
Posts: n/a
 
      02-11-2004
> 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>


 
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
Translating Oracle Package Call from ADO to ADO.Net dmiratsky@yahoo.com ASP .Net 0 02-14-2005 10:39 PM
Transfer ADO Code to ADO.NET ronaldlee ASP .Net 1 12-17-2004 04:08 PM
Accessing an ADO Recordset or Record from ADO.NET nita ASP .Net 1 11-20-2004 07:06 AM
constants declaration Benjamin Todd VHDL 2 02-15-2004 01:49 PM
Ado sort error-Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB. Navin ASP General 1 09-09-2003 07:16 AM



Advertisments