Error connecting to Access Database

Results 1 to 3 of 3

Thread: Error connecting to Access Database

  1. #1
    Joe Kimbler Guest

    Default Error connecting to Access Database

    I have a strange problem. I have a web site that pulls data out of an access database. On my home page, when I try to access <BR><BR>Error number = 0<BR>Description = [Microsoft][ODBC Driver Manager] Driver&#039s SQLSetConnectAttr failed<BR>Error Source = Microsoft OLE DB Provider for ODBC Drivers<BR>Native Error = 0<BR>SQL State = IM006<BR><BR>...out of my error trap. However, when I connect to this database from any other page on the site, it works fine. The error is in the connection, not returning the recordset.<BR><BR>I use the:<BR><BR>Set objConnect = Server.CreateObject("ADODB.Connection")<BR>Set objRecords = Server.CreateObject("ADODB.Recordset")<BR>objConne ct.Open "myDSN", "myUID", "myPWD"<BR><BR>sqlQuery = "SELECT * FROM mytable"<BR>objRecords.Open sqlQuery, objConnect<BR><BR>...algorithm for accessing the database on all pages. I can&#039t figure out what this error is or how to fix it. Any help would be great! Thanks much.<BR><BR>-Joe Kimbler

  2. #2
    Join Date
    Dec 1969

    Default RE: Error connecting to Access Database

    I don&#039t think you need to have the second ... server.create object with recordset.<BR><BR> set conn = server.createobject ("adodb.connection")<BR> "DSN"<BR> set RS = conn.execute(sql)

  3. #3
    Joe Kimbler Guest

    Default RE: Error connecting to Access Database

    I tried that already. I&#039m not getting the errror on the Recordset, I&#039m getting it when I connect.<BR><BR>-Joe<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