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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with dsnless connection strings

Status
Not open for further replies.

chrisparr21681

Programmer
Nov 18, 2002
17
GB
Dim Conn, dbPath
dbPath = "d:\myaccessfile.mdb"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & dbPath

thats what i have so far, i'm getting this error

Expected end of statement

/index.asp, line 4

dbPath = "d:\myaccessfile.mdb" Set Conn =

 
Try this:

Dim Conn, dbPath

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

Conn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE= d:\myaccessfile.mdb"

-DNG
 
Conn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & dbPath

dbPath is in the same line as conn.open right???


Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top