Powered By
 
 
 
ASP and Database
 

 

Code

<%

Dim adoCon 'Database Connection Variable
Dim strCon 'Holds the Database driver and the path and name of the database

'Create database connection

'Create a connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")

'Database connection info and driver (if this driver does not work then comment it out and use one of the alternative drivers)

'strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("[databasename].mdb")

strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
Server.MapPath("[databasename].mdb") 'This one is forAccess 2000/2002

'Set an active connection to the Connection object adoCon.Open strCon

%>

Best Viewed 1024 x 768 - Copyright NZ Web Service 2003