Subject Re: [firebird-support] FB Client support multi threading ?
Author Helen Borrie
At 01:30 AM 3/06/2005 +0000, you wrote:
>I'm sorry if I repeat the same question, since I cannot find any post
>about this using the yahoo search.
>
>I develop my application using dbExpress of Delphi 6. But seems like
>Firebird client does not support multithreading. Everytime one thread
>create new connection, the other thread will fail to create another
>connection. Is there something that I should do for this to work ?

1. Don't try to use local connections: use one or the other of the
network protocols to connect.

2. Don't try to make *any* connections to databases that are referred to by
shares or mappings.

The connection string should be either:

For TCP/IP:
ServerName:D:\absolute\path\to\database.file

For Named Pipes:
\\ServerName\D:\absolute\path\to\database.file

For TCP/IP, if the client program is local, i.e. running on the host
machine, you can also use the local loopback server:

Localhost:D:\absolute\path\to\database.file

Microsoft's Named Pipes ("NetBeui") implementation doesn't have an
equivalent to the TCP/IP local loopback, so multi-threaded connections have
no choice except to go via the wire.


>The same test application works fine when I change the connection
>property to mssql, that's why I suspect that the problem is not
>associated with dbExpress or my application.

Not sure what you mean by "change the connection property to mssql" but
your threading problem with Firebird is related to network
protocol. Firebird happens to have the "local connect" protocol --
"serverless attachment" - available for limited usage for a single
connection. It's a way of attaching a local client directly to a
Superserver thread in the client's own application space. MSSQL
attachments are is restricted to the NetBeui protocol, which doesn't have
such a thing.

However, Borland's DBX driver is quite generic and limiting. You could
consider using the InterXpress dedicated Firebird DBX driver, which can be
purchased from www.upscene.com for not very much. Though you can't break
the protocol rules, I believe this driver more effectively handles the
isolation issues for multi-threading connections. You can download a trial
version here:
http://www.upscene.com/index.htm?downloads.htm

./heLen