Low cost ecommerce web development India flash website design

The Connection Object

Before you can retrieve any data from a database, you have to create and

initialize a connection to that database. In ADO, you use a Connection object

to make and break database connections. A Connection object is a high-level

object that works through a provider (think driver) mat actually makes the

data requests.

Opening a Database Connection

A single project called ActiveX Data Objects Database (ADODB) contains all

the ADO objects. You create a Connection object in the same way as any

other ASP object - with the Server.CreateObject method.

Dim Conn

Set Conn = Server.CreateObject(“ADODB.Connection")

By default, connections are read-only, but you can create a read-write or

write-only connection by setting the Connection object's Mode property.

There are several Mode constants - in fact, ADO is rife with constants. You

have to include the adovbs.inc file (provided in the appendix to this guide).

To use the ADO constants, include the following line in each file where you

use ADO, substituting the appropriate drive and path for your server:

<!-- #INCLUDE FILE=”adovbs.inc” -->

58

If you open the adovbs.inc file with Notepad or another text editor, you'll

see groups of constants.

freelance web designer India web development

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73