ADODB problem

Results 1 to 2 of 2

Thread: ADODB problem

  1. #1
    Join Date
    Dec 1969

    Default ADODB problem

    Hi<BR><BR>I have a asp page which writes out the contents of a table to the page. Nothing special, simply outputting each cell and row into formatted HTML. Thing is this code has worked before (I havent changed it) but now it is failing at odd times. I realised that the error given below occurs after someone has updated the table from a different page. The error then occurs whenever someone tries to display the table contents, strange thing is it comes right after several hours.<BR><BR><BR>I have checked that no one is accessing the database during this error and the file and folder permissions are correct.<BR><BR>The connection string I am using is also fine as I use it in other places on the same database.<BR><BR>------ error ---------<BR>Microsoft JET Database Engine error &#039;80004005&#039;<BR><BR>The Microsoft Jet database engine cannot open the file<BR>&#039;\ b&#039;. It is<BR>already opened exclusively by another user, or you need permission to view<BR>its data.<BR><BR>/othersites/sts/admin/resadmin/printRes.asp, line 93<BR>-------- end of error code ----------<BR><BR>------- code snippet ------<BR>..<BR>..some asp and html code..<BR>..<BR>&#060;td valign="top" align="center"&#062;<BR>&#060;table width="500" cellpadding="0" cellspacing="0"&#062;<BR>&#060;tr&#062;<BR>&#060;t d align="center"&#062;<BR>&#060;%<BR><BR>Dim totalmapsPlayed, mapsFor, mapsAgainst<BR>Dim totalMatches, matchesFor, matchesAgainst, ratio, officalMaps, drawnMatches<BR>Dim objRS, strConnect<BR>&#039;-------- next line below is offending line no.93 ---------<BR>strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=\ b;"<BR>Set objRS = Server.CreateObject("ADODB.Recordset")<BR> objRS.Open "matchcalendar", strConnect, adOpenForwardOnly, adLockOptimistic, adCmdTable<BR> <BR>&#039;-------------------- Statistical data for output ------------------<BR>totalmapsPlayed = 0<BR>mapsFor = 0<BR>mapsAgainst = 0<BR>totalMatches = 0<BR>..<BR>..more asp and html code..<BR>..

  2. #2 Guest

    Default RE: ADODB problem

    Since you have not shown all your code I have to ask if you are closing and destroying your recordset before the end of this script, and the script where you update the data, e.g.:<BR><BR>objRS.Close<BR>Set objRS = Nothing<BR><BR>If you are leaving rs&#039;s lying around you may get locking which does not get cancelled until the db connection times out.<BR><BR>Also why use adLockOptimistic for a readonly rs, make it readonly.

Posting Permissions

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