Forum Moderators: phranque
[edited by: DaveAtIFG at 10:10 am (utc) on Jan. 30, 2003]
[edit reason] URL removed. Please avoid specifics whenever possible. [/edit]
Performance is also better with a DSN-less connection. The merits of DSN and DSN-less are discussed in 4guysfromrolla [4guysfromrolla.com] article. The advantage of DSN-less connection is that no ODBC setup is required.
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DBQ=http://www.elmanglar.com/webshare/dbcounter.mdb;DRIVER={MS Access (*.mdb)}"
objConn.Open
%>
you need to use the full path c:/webs/data...
or use the server.MapPath
Set MyConn = Server.CreateObject("ADODB.Connection")
conString = "DBQ=" & Server.MapPath("YourDatabase.mdb")
Myconn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & conString
DaveN
use the name on the drive c:\ or whatever?
You need to contact your web host or look through their FAQ. But the file location should look like a disk path (example - d:\inetpub\wwwroot\database\yourdatabase.mdb) and not a web address. In fact, your database should be placed in a directory that is not web accessible for security purposes. You don't want some random person downloading the database.