View Single Post
  #2 (permalink)  
Old April 10th, 2005, 08:25 AM
dalewright22 dalewright22 is offline
Authorized User
Join Date: Sep 2004
Location: , , United Kingdom.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts

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;" 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")


Reply With Quote