Hi,
There are two ways you can connect to MS Access database.
1) Oledb based :- Oledb based connection uses Providers supported by
microsoft. Connection string for connecting to MsAccess is like this
strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
Server.MapPath("mydatabase.mdb")
2) Dsn based. :- DSN based connection uses ODBC connection.For this you need to
create a DSN (preferably system dsn).
Start->Settings->ControlPanel->Administrative Tools->DataSources (odbc) ->
select System DSN tab ->Create new by following the steps in the wizard. Assume
you have named the dsn as "MyDSN".Remember you need to select appropriate
driver, in this case, Microsoft Access driver.
Connection string for connecting to MsAccess is like this
strConnectionString = "dsn=mydsn"
Now coming to connecting database using Asp.
1) Create Connection object
Dim objConnection
Set objConnection = Server.CreateObject("ADODB.CONNECTION")
2) Construct the Connection string from either of the two options provided above
3) Open connection
objConnection.open strConnectionString
Hope this helps....
Thanks,
Sreenath.
---------------------------------
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/