Click to See Complete Forum and Search --> : what does this include file do?
sail3005
Mar 10th, 2001, 06:28 PM
i see this file included in a lot of ASP scripts in books and stuff but don't know what it does:
<!-- #include virtual="/adovbs.inc" -->
If i remove or comment out that line, the code still seems to work.
I know it has to do with databases.
parksie
Mar 10th, 2001, 06:30 PM
That's not ASP code. It's actually a server side include :)
What that does is it basically includes the whole content of that file right there, before it's even got to the ASP engine.
sail3005
Mar 10th, 2001, 11:38 PM
yes, i know that it is not ASP code and i do know what a server side include is. What i was wondering is what exactly the file adovbs.inc has in it, and what it is used for.
I know it has to be more than just an include file made by some person, because it is included in some of my webserver files, and a lot of the scripts i download use it.
Active
Mar 11th, 2001, 02:43 AM
It holds th constants for ADO for VBscript use.
If u use Jscript u need adojavas.inc
and you can find both at...
C:\Program Files\Common Files\SYSTEM\ADO folder
It has the Constants mapped to actual Values.
For Example
'---- CursorTypeEnum Values ----
Const adOpenForwardOnly = 0
Const adOpenKeyset = 1
Const adOpenDynamic = 2
Const adOpenStatic = 3
If you include it u can use it like
RS.Open Query,Connect, adOpenStatic,adLockOptimistic
If You use these constants while using ADO without
including the include file...It will give you error.
The other Way to avoid this include file is to
use the numbers like
RS.Open Query,Connect, 3,3
But that would be very unfriendly...so
You can copy the constants to the Required ASP page.
and use those constants.
Including those file won't hurt though if you are not memory conscious.
parksie
Mar 11th, 2001, 06:18 AM
Originally posted by sail3005
yes, i know that it is not ASP code and i do know what a server side include is. What i was wondering is what exactly the file adovbs.inc has in it, and what it is used for.
I know it has to be more than just an include file made by some person, because it is included in some of my webserver files, and a lot of the scripts i download use it. Oops...sorry :) I got confused as to what you meant :(.
sail3005
Mar 11th, 2001, 10:35 AM
Originally posted by parksie
Oops...sorry :) I got confused as to what you meant :(.
oh, thats fine, thanks for helping.
And thanks Active for that help, that explained a lot.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.