Subject Re: Multiple threads with one connection each
Author nitaligavino <>
Hi Jonas:

I have not worked with the ODBC driver but I have worked directly
with the CLI, e.g., the API that the ODBC drive eventually calls
into. Anyway, as Alexander mentioned, item a, it's important that
the connection to the database is made as a TCP/IP connection when
working with multiple threads. If the connection is made locally,
like, "c:\database.gdb" attempting to connect and use multiple
threads will fail. The connection string needs to set the engine in
super server mode, e.g., "localhost:/c:/database.gdb", which supports
multithread clients. I suspect the configuration of the ODBC drive
is the cause of your lock.

Here is a snip-it from source forge:

" How does correct connection string look like?
Sample connection string:
"DRIVER={XTG Systems InterBase6 ODBC
IN1250;ROLE=myrole;" "

The connection sting in this example seta the engine in super server
mode, "DB=myserver:c:\mypath\mydb.gdb", by specifying the server name
before the db path.

Hope this helps!

Best regards,

--- In, "Alexander V.Nevsky <ded@h...>"
<ded@h...> wrote:
> --- In, "Datatal AB - Gauffin, Jonas"
> <jonas@d...> wrote:
> > Hello
> >
> > I'm writing a small test application for firebird that uses Open
> > FireBird ODBC Driver.
> > Everything works nice when I got one connection.
> > But as soon as I load up more threads, with one connection each,
> > everything stops in the execution of a sql statement (SELECT
> >
> > I've started with a thread that do random reads and a thread that
> > random inserts/updates.
> [skip]
> > What can be wrong?
> Jonas, I don't know C, but I could'nt find in your text
> a) connection string - local connections are queued in gds32 so you
> threads will wait each other.
> b) transaction parameters - some modes produce infinitive waiting
> lock conflict resolution with random tests.
> Best regards, Alexander V.Nevsky.