ADO error on a network using Access

Results 1 to 2 of 2

Thread: ADO error on a network using Access

  1. #1
    Vipul Desai Guest

    Default ADO error on a network using Access

    I am having a problem Opening up an Access MDB file using ADO. <BR>The problem that I am having is that when I put my MDB on my local machine, my Activer Server Pages application works fine. <BR>But when I use a connection on the server, it crashes. The code I use is as follows:<BR><BR>ConnSampColl.Open "Provider = Microsoft.Jet.OLEDB.3.51.;Data Source = j:shareanalyticvipulproj1samples1.mdb"<BR><BR>I know there is no security issue here as I can open it up in Access, and also that I can delete it and view it within DOS.<BR><BR>Can someone please help.<BR><BR>Thanks,<BR><BR>Vipul

  2. #2
    Join Date
    Dec 1969
    Posts
    463

    Default RE: ADO error on a network using Access

    The problem could be in the Hardcoded path you are using to the .mdb file. Are you sure this is correct. Try using server.mappath instead of hardcoding the path. Here is a very simple DSNless conection I have used.<BR>&#060;%<BR>set conntemp=server.createobject("adodb.connection")<B R><BR>&#039DSNless connection to Access Database<BR>DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)};"<BR>DSNtemp = dsntemp & "DBQ=" & server.mappath("rick.mdb")<BR>conntemp.Open DSNtemp<BR>%&#062;

Posting Permissions

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