Jump to content

How to turn off Firebird exception msg (deadlock message)?


Recommended Posts

I simultanously run some threads and from time to time I have a message, that there is concurrent deadlock exception (update conflict with concurrent update). I know, that it sometimes happens, but is it possible to somehow turn off displaying messaging from Firebird? Or better somehow handle this exceptions ? 

Link to comment
Share on other sites

OK, sorry, maybe my  text is too compressed. I use Firebird as a database in my AutoIt application with "fbdll4vb20.dll". SQL works pretty well, I can UPDATE, INSERT, SELECT etc. from a database using Firebird.au3 UDF. It works perfectly but from time to time I have a message as I mentioned in my first post. The bad news is that the whole application stops and waits until I pressed OK. So, is there any Firebird AND AutoIt user who knows how to turn it off?

I read something about ObjEvent and handling errors but I gave up trying use it with Firebird DLL. Any help? 

Link to comment
Share on other sites

  • Moderators

OK, sorry, maybe my  text is too compressed. I use Firebird as a database in my AutoIt application with "fbdll4vb20.dll". SQL works pretty well, I can UPDATE, INSERT, SELECT etc. from a database using Firebird.au3 UDF. It works perfectly but from time to time I have a message as I mentioned in my first post. The bad news is that the whole application stops and waits until I pressed OK. So, is there any Firebird AND AutoIt user who knows how to turn it off?

I read something about ObjEvent and handling errors but I gave up trying use it with Firebird DLL. Any help? 

 

How about posting your code (or a working reproducer if sensitive), so we can see what you're doing? Also, not being familiar with firebird personally, is the message a windows form that you could get info from with the Window Info Tool (a screenshot would be nice)? If so, perhaps post the information about the message window.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Here is beginnig of my  code:

#include "firebird.au3"
...

if _FireBird_ExecuteSelect($h_fbDll, "select p.semaphore from  people p where (p.semaphore is not null) and (p.id_people=" & $id & ")", $result)=0 then ; nobody set sempahore for this person yet

    $sttmt='update people p set p.semaphore=1 where p.id_people=" & $id ; try to reserve this person

   _FireBird_ExecuteStatement($h_fbDll, $sttmt))

endif

 

I run simultanously about 10 or 15 times a program, which have this piece of code. It reserves the person with given $id. First I check if any other program reserved this person. If not I try to set semaphore to 1. But from time to time I have the warning message which should be closed before program can continue.

post-59880-0-39372800-1399928053_thumb.j

As I read, this happens when transaction tries to update or delete a record that some other transaction updated or deleted. This is a normal event in database world and application should be ready to deal with it. My application is ready, but how to make this message invisible and inactive? I didn't start a transaction, firebird does it itself with each statement.

BR.

post-59880-0-39372800-1399928053_thumb.j

Edited by zbigj
Link to comment
Share on other sites

  • 1 year later...

this thread is now a year old... I am guessing what you are looking at is a MsgBox in the FireBird.au3 UDF.  I suggest you go looking for that error loop and add a time-out to the MsgBox - then it should go away by itself eventually...

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

  • 1 year later...

:)

I have since played a bit with Firebird.  I just guess that what you are seeing is a WAL file related problem.  Try to issue a "Commit;" at the end of your query.  If you cannot see your changes AND you keep on getting this kind of message it may mean that your instruction is sitting in the WAL file, waiting for the Commit to finalize.

Hope I explained that clearly. :)

 

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...