DSN-Less Connection Problems

Results 1 to 2 of 2

Thread: DSN-Less Connection Problems

  1. #1
    JustinS Guest

    Default DSN-Less Connection Problems

    Hiyas all,<BR><BR>I have been trying to use the following DSN-less connections as shown below<BR>to connect to an Access Database but am having problems -<BR><BR>(As Webhostme advise - see: http://www.webhostme.com/dsn-less.asp)<BR><BR>Using -<BR><BR>Set AdoConn = Server.CreateObject ("ADODB.Connection")<BR>AdoConn.Provider = "Microsoft.Jet.OLEDB.4.0"<BR>AdoConn.ConnectionStr ing = "Data Source=" & Server.MapPath<BR>("/cgi-bin/guestbook.mdb")<BR>AdoConn.Open<BR>Set AdoConn = nothing<BR><BR>I got the following error -<BR><BR>Microsoft JET Database Engine error &#039 80004005&#039<BR>Unrecognized database format &#039D:webhostme2293Webcgi-binguestbook.mdb&#039.<BR><BR>--<BR><BR>Attempt 2:<BR><BR>Using -<BR><BR>set MyConn = server.createobject("adodb.connection")<BR>DSNtemp ="DRIVER={Microsoft Access Driver(*.mdb)};"<BR>DSNtemp=dsntemp & "DBQ=" & server.mappath("/cgi-cin/guestbook.mdb")<BR>MyConn.Open DSNtemp<BR><BR>I got the following error -<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039<BR>[Microsoft][ODBC Driver Manager] Data source name not found and no default<BR>driver specified<BR><BR>Anyone spot the problem? - must be something I&#039ve missed, just can&#039t seem to spot what it is =(<BR><BR>Thanks in advance for any help,<BR><BR>Regards,<BR><BR>Justin<BR><BR>PS: If I figure out the answer i&#039ll post the reasons as to why =)

  2. #2
    Join Date
    Dec 1969

    Default RE: DSN-Less Connection Problems

    set connect = server.createobject("adodb.connection")<BR> connect.open "driver={microsoft odbc for oracle}; server= your_server_name; uid=user_id_for_oracle-log on; pwd=your oracle password"<BR>------------------------------------------------<BR>Try using this may be it helps, you may have to change the driver name to suit your driver which would be Access.<BR>Good Luck.

Posting Permissions

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