A connection problem that only sometimes occurs

Results 1 to 3 of 3

Thread: A connection problem that only sometimes occurs

  1. #1
    Join Date
    Dec 1969

    Default A connection problem that only sometimes occurs

    Hi,<BR>I&#039;m working on a site that requires me to access an access db. Now, half the time it works fine, the other half of the time i get <BR>Error Type:<BR>Provider (0x80004005)<BR>Unspecified error<BR>/cube/DBConn.asp, line 5<BR>Now, I get this error regardless of making any changes, I also terminate all connection I make once I&#039;m finished using them, and I&#039;ve even tried recreateing the DNS a few times. Usually when I get this error I get it all the time, not every now and then. This is getting frustrating because it&#039;s really slowing me down, cna any one give any advice for what I should be looking for that could be causing this? Any help would be great, thanks.

  2. #2
    Join Date
    Dec 1969

    Default What's line 5? (eop)


  3. #3
    Join Date
    Dec 1969

    Default It's very likely that your code...

    ...is wrong somewhere, unless your hosting company or your web server (if you run your own) are having problems with database access. Have you checked that first?<BR><BR>I have had something similar a long time ago, when I first started programming database access via ASP, and it was down to my code.<BR><BR>I suggest you check your whole code and triple-check that you always close all cursor (recordsets) and connections. This will be laborious if you have lots of code, but it&#039;s worth it.<BR><BR>Also, check what your code does when an error occurs. Error trapping is very important. I found that our web server sometimes left connections and cursors open after when an error, in particular if the error occured between opening and closing a recordset. Eventually database access became very unstable. So, do proper error trapping. In JScript you can use try/catch and in VBScript On Error Goto.<BR><BR>These are just some pointers. If you can identify a particular page or section of code that&#039;s causing trouble, you might want to post the relevant code here and we can have a look. But don&#039;t post pages and pages of code.<BR><BR>Good luck,<BR>Oliver.

Posting Permissions

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