Subject Unsuccessful execution error
Author Rik Barker

I'm really new to Firebird (and pretty new to SQL development
altogether). I'm having some problems with an app that I hope someone can
help with.

I've got an app that is currently using superserver mode to talk to a
Firebird database. The database is installed on the same PC the app runs from.

The app potentially adds several thousand records at once, and does it
using threads. Each thread creates a new Query object to perform any
queries or updates.

Once the app is completed, It's extremely likely it will be released using
the embedded server. As a result, all the threads and queries are using the
same database connection (unless I'm wrong, I can only have one connection
with the embedded server?)

The problem I'm having seems to be occurring if a thread is actively adding
records and I try and refresh the view in the app (main thread, performing
a select), I get either an access violation or
the following SQL exception:

Error Code: -901. "Unsuccessful execution caused by system error that does
not preclude successful execution of subsequent statements."

I'm a bit confused. Should I be creating a new connection for each
query? Won't that stop me using the embedded server? Apologies if this is
documented somewhere, I've read somewhere in the region of 800 pages of
Firebird and Interbase documentation today and I've mildly fried my brain.

Developing using Firebird 1.5 and Delphi 7 with Zeoslib 6.5.1 in case that
helps explain anything.