ADO VBScript Sample

Microsoft ActiveX Data Objects (ADO)

ADO VBScript Sample

ADOVBS demonstrates how to use ADO from Visual Basic, Scripting Edition and HTML. Additionally, it demonstrates how ADO, VBScript, and HTML on the client can be used to build a two or three-tier Web application for an intranet. Lastly, it demonstrates how to create a three-tier connection using ADO and the Microsoft OLE DB Remoting Provider. It is installed to c:\Program Files\Platform SDK\Samples\DataAccess\ado\VBS.

In this sample, some of the VBScript and HTML code is generated at run-time in order to generate fields based on the schema information in the Recordset.

There are two variations of this sample in this directory. The first, ADOVBS.HTM, uses only client-side scripting and requires that your client have ADO installed as well as a System DSN called "OLE_DB_NWind_Jet", which points to the MDAC SDK Sample .mdb (Access database). You can find this database in c:\Platform SDK\Samples\DataAccess\ado\XML\Nwind.mdb. This sample shows direct connection to the data source from the Web client.

Note   This sample requires Microsoft Internet Explorer 4.01 Service Pack 1 or later, and you will also need to set your security settings to low for the Web server you're connecting to.

The second variation of this sample, Adovbs.asp, uses both IIS scripting and client-side scripting. It assumes that you're running the sample from a client with Internet Explorer 4.0 or later.

To run ADOVBS

  1. Copy the files in c:\Platform SDK\Samples\DataAccess\ado\vbs into a virtual directory on your Web server computer that has script and execute permissions.

  2. Open the Adovbs.asp page in Internet Explorer using the address, http:// computer name/virtual directory/ADOVBS.ASP where computer name and virtual directory are your computer name and the virtual directory that points to the location of the sample files copied in Step 1.