different errors creating DSN-less connection

Results 1 to 3 of 3

Thread: different errors creating DSN-less connection

  1. #1
    Join Date
    Dec 1969

    Default different errors creating DSN-less connection

    ok, thanks to your help i&#039;ve gotten past the error opening a registry key, but now I&#039;m getting something totally different. i&#039;m getting the error:<BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80004005)<BR>[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified<BR>/asp/ch13/connprops.asp, line 28<BR><BR>this implies to me that it&#039;s trying to create a DSN connection, which is exactly what I don&#039;t want to do. <BR><BR>here&#039;s lines 24-28 for reference:<BR><BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR><BR>Mdb FilePath = Server.MapPath("aspch13Contact.mdb")<BR><BR>objCon n.Open "Driver = (Microsoft Access Driver (*.mdb)); DBQ =" & MdbFilePath & ";"<BR><BR>any help will be appreciated, sorry for asking what are probably silly questions to most of you.

  2. #2
    peterjl@austec.net.au Guest

    Default Need Curly brackets around the driver name!

    objConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ =" & MdbFilePath & ";"<BR><BR>And assumption is incorrect. Your code is creating a DSN-less connection.<BR><BR>A DSN connection would look like:<BR><BR>objConn.Open "MyDSN" <BR><BR>where MyDSN is the name of a DSN that has been setup on the server.

  3. #3
    Join Date
    Dec 1969

    Default had that originally..

    but it was suggested to me that i use () instead of {}. i get the same error either way.

Posting Permissions

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