Subject | Re: [firebird-support] waiting for eventholds OIT |
---|---|
Author | Martijn Tonies |
Post date | 2007-11-07T11:31:21Z |
Nick,
client, do your thing and commit the transaction?
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> I have a program which just connects to the database and waits for an:db_password;
> event to occur, it then handles it and waits again (see code excert
> below).
>
> The problem is that it seems to be holding the OIT, after a busy
> period that didn't cause any events oldest & next transactions differ
> by over 400,000, as soon as I caused an event oldest caught up.
>
> I figure I either need to connect with different params or some
> different transaction parameters but I can't see what to change.
>
>
> EXEC SQL CONNECT :db_filename USER :db_username PASSWORD
>Why are you starting a transaction here?
> /* Go with read committed to see updates */
> EXEC SQL SET TRANSACTION READ COMMITTED;
> EXEC SQL EVENT INIT ALERT_WAIT ('amsalert');Why not start the transaction once the event has arrived at the
>
> while (0 == 0) /* until killed */
> {
>
> EXEC SQL EVENT WAIT ALERT_WAIT;
> handle alert
> }
>
client, do your thing and commit the transaction?
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com