Forum Moderators: open

Message Too Old, No Replies

Dreamweaver & ASP

I need a string...

         

Gert_Jan

4:05 pm on Feb 18, 2004 (gmt 0)

10+ Year Member



Can anyone give me a good Custom Connection String for accessing an access database whitch is in the same folder as the .asp file itself? I dont know what to fill in there.

Thanx

G.

mattr555

6:03 pm on Mar 10, 2004 (gmt 0)

10+ Year Member



First one connects to a database in whatever folder you specify.

The second one uses the Server.Mappath function to resolve the current relative folder to an actual physical path and will connect to an Access database in the same folder as the ASP page.

<%
adoCon.Open "Driver={Microsoft Access Driver (*.mdb)}; Dbq=c:\somepath\databasename.mdb;"
%>

<%
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("databasename.mdb")
%>

Gert_Jan

8:35 am on Mar 11, 2004 (gmt 0)

10+ Year Member



Thanx