Can't Connect using DSN-less

Results 1 to 2 of 2

Thread: Can't Connect using DSN-less

  1. #1
    Join Date
    Dec 1969

    Default Can't Connect using DSN-less

    Hi,<BR>I am fairly new to ASP, and am having trouble connecting to a database.<BR><BR>I try this:<BR>objConn.ConnectionString="DRIVER={Microso ft Access Driver (*.mdb)};" & "DBQ=d:"<BR>objConn.O pen<BR><BR>I get the following error:<BR>[Microsoft][ODBC Microsoft Access Driver] Cannot open database &#039(unknown)&#039. It may not be a database that your application recognizes, or the file may be corrupt. The database is there, I assure you. I have tried this code in so many different ways, and I&#039ve verified that the path is correct with my host. Any ideas? Any and all help is greatly appreciated!<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Can't Connect using DSN-less

    Zach,<BR>Looks like you are missing a space after the semi-colon.<BR>Also an underscore if there is a return after the &<BR><BR>Try this....<BR>&#039 DSNless connection to Access Database<BR>strConn="DRIVER={Microsoft Access Driver (*.mdb)}; "<BR>strConn=strConn & "DBQ=d:"<BR>conn. Open strConn<BR><BR>Also if Masters.mdb is in the same directory you use<BR>server.mappath("Masters.mdb") instead of the full path...<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