Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ado typelibrary in global.asa not recognized

Status
Not open for further replies.

charlotte49er

Programmer
Nov 17, 2001
25
US
I have an application in IIS called "flood_warn." In that directory I have a global.asa file with two includes:
Code:
<!--
  METADATA TYPE=&quot;typelib&quot; 
	FILE=&quot;C:\Program Files\Common Files\System\ADO\msado20.tlb&quot; 
-->
<!--
  #include file=&quot;asp_scripts\ErrorHandler.asp&quot;
-->

However, when I try to open a recordset within an asp page I receive the error message &quot;Variable is undefined: 'adOpenStatic'.&quot;

Here is the line of code in the asp page:
Code:
theRS.open sqlStatement, oConn, adOpenStatic, adCmdTable

I have tried modifying 'adOpenStatic' to 'ADODB.adOpenStatic' with no luck. The code in the asp page itself is sound because if I move the includes into the page everything works as intended. Could anyone please provide some suggestions? Thanks.
 
<!--
METADATA TYPE=&quot;typelib&quot;
FILE=&quot;C:\Program Files\Common Files\System\ADO\msado20.tlb&quot;
-->

This needs to be before the <script> tags.
 
The includes shown in the previous post are before any script tags. Any other ideas?
 
Well... I don't think you can do SSI includes in your global.asa. Remember that the global.asa file isn't an .asp page or shtml page. The global.asa is a special script that doesn't use IIS (which processes the SSI includes).
 
Dear
use the 'adodb.inc' include file to include in your page to get the constant value from this file for 'adopenstatic' variable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top