Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to connect to a remote MS Access database using ASP

Status
Not open for further replies.

kishore22

Technical User
Sep 25, 2002
12
US
Hi guys,
I need to insert some data into MS Access database using ASP.

I need the steps to connect to the remote MS Access database.

Thanx
 
This is what I use and it always works. The key thing is setting up your ODBC/DSN connection string on the server, then using the ASP to call that string.

Dim myConn
Dim strNaDB

Set myFSO=CreateObject("Scripting.FileSystemObject")
Const ForReading = 1, ForWriting = 2, ForAppending = 8

'Build the Dataset Connection String
strPathToMDB="\\ospsdev1\AccessData\AssociateSetup.mdb"
myConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strPathToMDB & ";User Id=dt23782;Password=dt23782; "
Set myConn=Server.CreateObject("ADODB.Connection")
strNaDB="DSN=NewAssociate123"
myConn.Open strNaDB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top