Subject | Re: Unsuccessful execution error |
---|---|
Author | Adam |
Post date | 2006-05-18T23:44:32Z |
> I'm really new to Firebird (and pretty new to SQL developmentsomeone can
> altogether). I'm having some problems with an app that I hope
> help with.runs from.
>
> 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
>using
> 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
> the embedded server. As a result, all the threads and queries areusing the
> same database connection (unless I'm wrong, I can only have oneconnection
> with the embedded server?)No you can not do this because the connection is NOT threadsafe.
An embedded server is able to support multiple connections providing
they are initiated by a single process. Each thread must have its own
connection object. Not sure about whether they can share a transaction
or not, but I doubt it.
This probably explains your AV below.
Adam
>adding
> The problem I'm having seems to be occurring if a thread is actively
> records and I try and refresh the view in the app (main thread,performing
> a select), I get either an access violation orthat does
> the following SQL exception:
>
> Error Code: -901. "Unsuccessful execution caused by system error
> not preclude successful execution of subsequent statements."this is
>
> 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
> documented somewhere, I've read somewhere in the region of 800 pages ofbrain.
> Firebird and Interbase documentation today and I've mildly fried my
>case that
> Developing using Firebird 1.5 and Delphi 7 with Zeoslib 6.5.1 in
> helps explain anything.
>
> Cheers,
> Rik
>