Connection to Firebird Server + Embedded at the same time

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
SonnyBoy
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 11.06.2009, 20:31

Connection to Firebird Server + Embedded at the same time

Post by SonnyBoy »

Hello!
I have a littel problem with the TZConnection.
I try to connect to a Firebird Server and a Firebird Embedded Database a the same time. I need this for a machine control system.
I generate to Instance of TZConnection. With the first i connect to the embedded and with the second to the server. When i now access data, this happens: i retriev data from the embedded whit my LocalConnection and then data from the Server with my ServerConnection. I then try to retriev data from the Embedded with the localConnection again, but the localConnection now tries to recieve data from the server ?!?
Why that? where do i have a mistake? something special in the use of two TZConnections?
(with only one TZConnection and only one database system everything is okay, but two TZConnections and two database nothing works). and i need the access of the two databases at the same time (no switch mode available).
Can someone help me please?
Thank you a lot!
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

This should work without problems.
Only explanation I have is both connections use the same library. Sure both are using a different protocol and dll?

Mark
Image
fcodebue
Junior Boarder
Junior Boarder
Posts: 32
Joined: 05.04.2008, 16:02
Contact:

Post by fcodebue »

You prepare your two connections at runtime... could you post some sample code... just for check that your are set all parameters correctly
Codebue Fabio
P-Soft - http://www.p-soft.biz
Firebird La Comunità Italiana - http://www.firebirdsql.it
GestionaleOpen - http://www.gestionaleopen.org
SonnyBoy
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 11.06.2009, 20:31

Code Example

Post by SonnyBoy »

This is a code example that doesn't work.
the 3rd request goes to the server but should be on the embedded
You do not have the required permissions to view the files attached to this post.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

I see no obvious problems.

Did you check if the connections use 2 different dll's? I'm not sure if it's possible to connect from the 'embedded' dll to a normal server (as is possible with the mysql embedded client library)?

Some fb specialist wants to have a look at this?

Mark
Image
Post Reply