Yeah you have the connection string wrong. It Should be like this:
Dim conn, RS, strSQL
Set conn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.Recordset")
ConnStr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database")
Conn.Open Connstr
strSQL = "SELECT * FROM tbl;"
rs.open strsql, conn
Or in your case (Cause your open a connection on a remote comp)
Dim Conn, RS
Set Conn = CreateObject("ADODB.Connection")
Conn.Provider = "Microsoft.Jet.OLEDB.4.0"
Conn.Open "\\server\share\file.mdb"
Set RS = Conn.Execute("SELECT * FROM TABLE")
Cheers
DJWright
|