Errors when trying to create a DSN-less connection

Results 1 to 3 of 3

Thread: Errors when trying to create a DSN-less connection

  1. #1
    Join Date
    Dec 1969

    Default Errors when trying to create a DSN-less connection

    I&#039;m trying to create a DSN-less connection to an access db, and i&#039;m getting the following server error--<BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80004005)<BR>[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key &#039;Temporary (volatile) Jet DSN for process 0x310 Thread 0x4c4 DBC 0x1347e7c Jet&#039;.<BR>/asp/ch13/connprops.asp, line 27<BR><BR>line 27 in this script is:<BR>objConn.Open strConnect<BR><BR>and strConnect="Driver={Microsoft Access Driver (*.mdb)}; DBQ = c:Documents and SettingsContact.mdb"<BR><BR>I thought it perhaps didn&#039;t like the spaces in the db path, so I recreated the whole thing in a dir without spaces and got the same error. this db has a dsn set up for it, and the script works fine if I use that. but the whole point of doing my doing this is to practice using a dsn-less connection. anyone have any ideas what I&#039;m doing wrong here?

  2. #2
    Join Date
    Dec 1969

    Default use OLEDB not ODBC

    there&#039;s a tutorial on it at<BR><BR>(look in the ASP section)

  3. #3
    Join Date
    Dec 1969

    Default Try this...

    Set objConn = Server.CreateObject("ADODB.Connection")<BR><BR>Mdb FilePath = Server.MapPath("C:Documents and SettingsContact.mdb")<BR><BR>objConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"<BR><BR>I only use DSN-less connections, and that&#039;s what works for me. The only two slight differences I see are that (1) I use &#039;()&#039; and you use &#039;{}&#039; to bracket the Driver statement, and (2) I have a semi-colon at the end of my DBQ statement. They may be nothing, but then again...<BR><BR>Also, if you go to the Microsoft site and do a search on your error statement you might be able to get more clarification on what the problem is.

Posting Permissions

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