ADO I see an article abroad, now translates as follows ... It certainly helps.
One drawback of ASP is that when we are using a component, we are not going to get it.
For example, when you want to use ADO, you must first include the Adovbs.inc file
Or do a similar job, look at the following code:
<!--#include virtual= "/adovbs.inc"-->
<%
Dim objconn, strSQL
Set objconn = Server.CreateObject ("ADODB. Connection ")
objConn.Open "Dsn=blah"
strSQL = "SELECT * FROM Table1"
Dim objRS
Set objRS = Server.CreateObject ("ADODB. Recordset ")
Objrs.open strSQL, objconn, adOpenKeyset
'...
%>
Now let's try another way.
Use metadata label
The label is formatted as follows:
<!--METADATA
Type= "TypeLib"
File= "FileName"
Uuid= "Tylelibraryuuid"
-->
First, you need set type= "TypeLib", where the file and UUID two can only be specified one.
You can specify a TLB or DLL file directly to the file property.
For example, on my machine, I did this:
<!--METADATA
Type= "TypeLib"
Uuid= "00000200-0000-0010-8000-00AA006D2EA4"
-->
And
<!--METADATA
Type= "TypeLib"
file= "C:\Program Files\Common Files\system\ado\msado20.tlb"
-->
Now let's take a look at how to replace the Adovbs.inc file
Replace with the following code where you originally included the file:
<!--METADATA
Type= "TypeLib"
file= "C:\Program Files\Common Files\system\ado\msado20.tlb"
-->
<%
Dim objconn, strSQL
Set objconn = Server.CreateObject ("ADODB. Connection ")
objConn.Open "Dsn=blah"
strSQL = "SELECT * FROM Table1"
Dim objRS
Set objRS = Server.CreateObject ("ADODB. Recordset ")
Objrs.open strSQL, objconn, adOpenKeyset
'...
%>
However, I originally used Adovbs on the original page. Inc Well, why use so long a code, too cumbersome, yes, is a bit of trouble, but you can put this code in the Global,asa, so you can use application to get a global variable.
Be careful to put it inside the <SCRIPT> block.
Let's take a look at what Microsoft says, I've only found an article that can be summarized as follows:
The avoid using Server-side #include directives to include large lists of constants. Use the ' new <METADATA> tag to ' import Type-library constants into Global.asa '
This is the original.
Http://msdn.microsoft.com/library/psdk/bdg/bdgapp03_3rhv.htm
Two points to be aware of where you are in global. ASA uses metadata, while you use ADOVBD at the same time. Inc., you'll get an error.
The second is that the method requires at least IIS4 support.
I wish I could be of some help to you.