i see this file included in a lot of ASP scripts in books and stuff but don't know what it does:
If i remove or comment out that line, the code still seems to work.Code:<!-- #include virtual="/adovbs.inc" -->
I know it has to do with databases.
Printable View
i see this file included in a lot of ASP scripts in books and stuff but don't know what it does:
If i remove or comment out that line, the code still seems to work.Code:<!-- #include virtual="/adovbs.inc" -->
I know it has to do with databases.
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.
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.
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.
Oops...sorry :) I got confused as to what you meant :(.Quote:
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.
oh, thats fine, thanks for helping.Quote:
Originally posted by parksie
Oops...sorry :) I got confused as to what you meant :(.
And thanks Active for that help, that explained a lot.