accessing a remote access database

Results 1 to 3 of 3

Thread: accessing a remote access database

  1. #1
    steb Guest

    Default accessing a remote access database

    hi,<BR><BR>is it possible to load an access database from a http server from somwhere other than your server?<BR><BR>DataConn.Open "DBQ=" & Server.MapPath("db.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;MaxBufferSize=8192;Threads=20 ;", "username", "password"<BR><BR>this is the open command I have now. is it possible to modify this to load it from another server?<BR><BR>thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: accessing a remote access database

    Try this article : <BR>

  3. #3
    steb Guest

    Default RE: accessing a remote access database

    thanks, I tried the command there, it seems to work, until it crashes on this line :<BR><BR>rsDC.Open cmdDC, , 0, 1<BR><BR>is there anything else that I need to change before that? here is my code :<BR><BR>&#039; Create and establish data connection<BR>Set DataConn = Server.CreateObject("ADODB.Connection")<BR>DataCon n.ConnectionTimeout = 15<BR>DataConn.CommandTimeout = 30<BR><BR>&#039;Access connection code<BR>&#039;DataConn.Open "DBQ=" & Server.MapPath("tones.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;MaxBufferSize=8192;Threads=20 ;", "username", "password"<BR>DataConn.Open "Provider=MS Remote;" & _ <BR> "Remote Server=;" & _<BR> "Remote Provider=Microsoft.Jet.OLEDB.4.0;" & _<BR> "Data Source= ones.mdb;", _<BR> "", ""<BR><BR>&#039; Create and link command object to data connection then set attributes and SQL query<BR>Set cmdDC = Server.CreateObject("ADODB.Command")<BR>cmdDC.Acti veConnection = DataConn<BR>&#039;cmdDC.CommandText = "SELECT * FROM tones WHERE name LIKE &#039;%song%&#039; OR keywords LIKE &#039;%s%&#039;;"<BR>cmdDC.CommandText = "SELECT * FROM tones WHERE keywords LIKE &#039;%wwf%&#039;;"<BR>cmdDC.CommandType = 1<BR><BR>&#039; Create recordset and retrieve values using command object<BR>Set rsDC = Server.CreateObject("ADODB.Recordset")<BR>&#039; Opening record set with a forward-only cursor (the 0) and in read-only mode (the 1)<BR>rsDC.Open cmdDC, , 0, 1 &#060;-- CRASH..<BR><BR><BR>thanks!<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts