• Index
  •  » ASP
  •  » Connect with Access Database

#1 2007-04-23 23:53:17

goldman
New member
Ranking
Registered: 2006-08-24
Posts: 4
Expertise

Connect with Access Database

I am developing a website, which updates an MS-Access 2000 database located in client's Harddisk, apart from maintaining data in the web-server.

The server database is updating properly(specified thru server.mappath).
How to specify connection parameters for the local database(MS Access-2000)?

How to connect using ASP 3.0 or ASP.net 2003.

Offline

 

#2 2007-04-25 22:20:09

rezaul
New member
Ranking
Registered: 2007-02-03
Posts: 8
Expertise

Re: Connect with Access Database

May be following information will help you.

First, import the "System.Data.OleDb" namespace.

<%@ Import Namespace="System.Data.OleDb" %>

Then create the connection to the database using a variable with a connection string which identifies the OLE DB provider and the location of the database.

db=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
data source=" & server.mappath("xtest.mdb"))


it work in ASP.Net. You can try this.

thanks

Offline

 

#3 2007-11-10 04:05:23

shakir
New member
Ranking
Registered: 2007-11-10
Posts: 8
Expertise

Re: Connect with Access Database

Set cnn= Server.CreateObject("ADODB.Connection")

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("dbname")

Offline

 
  • Index
  •  » ASP
  •  » Connect with Access Database

Board footer

OPML feedsRSS feeds



Powered by WWWThreads Forum
© Copyright 2006, WWWThreads