July 2000
Intermediate to advanced
492 pages
14h 53m
English
<%
' This code uses the Server object's CreateObject
' method to instantiate an ADO Connection object and
' a Recordset object. For more details about the Open
' method and the ActiveConnection property in the
' example, see Section 12.4.2 later in this chapter.
Dim adoCon
Dim adoRec
Set adoCon = Server.CreateObject("ADODB.Connection")
Set adoRec = Server.CreateObject("ADODB.Recordset")
' Open the database connection to my database.
adoCon.Open "MyDatabase"
' Set the Connection object to which the Recordset
' object is attached to adoCon.
adoRec.ActiveConnection = adoCon
%>For more details on the use of the CreateObject method, see its entry in Chapter 9.
Read now
Unlock full access