0

I have several Firebird databases, some created with Firebird v2.5.9 (ODS 11.2) and some with Firebird 5.0.3 (ODS 13.1.) Both Firebird versions are installed on my VM using different ports, and using the appropriate VendorLib and port I can work with either version, one at a time.

I previously wrote a DB browser utility that I'm trying to update to work with either Firebird version. The browser can open multiple FDBs at once, and I want it to be able to open both v2.5 and v5.0 FDBs at once. In the browser, each FDB has a datamodule with its own TFDPhysFBDriverLink and TFDConnection, so things should be isolated. I can get the ODS from the FDB file and set the appropriate VendorLib in the driverlink and port in the connection, but once I've opened a FDB of either version, trying to open a FBD of the other version returns a error on mismatched ODS versions - the new connection is apparently using the first connection's VendorLib.

I've read that I need to call the DriverLink's Release method and clear the connection pool to make this kind of switch between different FDB versions, but that requires closing all open connections, which defeats the purpose of having multiple FDBs of varying versions open at once.

Is there a way to do what I want here?

6
  • 1
    Why do you need to specify a different VendorLib? The Firebird 5.0 client library can connect to Firebird 1.0 and higher just fine over TCP/IP. It rather sounds like you're trying to use embedded (where the engine is part of the client library) instead of using TCP/IP connections to a server. Commented Aug 19 at 8:57
  • In other words, you need to describe your problem in more details, and explain why you need to change (or think you need to change) the VendorLib between connections. Commented Aug 19 at 8:59
  • I'm guessing that the problem you are facing here is that both instances of your Firebird database are creating their own respective temporary files in same the default folder. This is what leads to errors when one instance finds already existing temporary file from another version. It is technically possible to configure Firebird database to use custom location for tem files but is not recommended. You should read: FirebirdSQL: internal files, temporary files, and environment variables Commented Aug 19 at 9:08
  • @Mark - I wasn't aware that the v5.0 fbclient.dll can connect to earlier version servers. Just using the 5.0 version client across the board will eliminate my issue. Thanks!! Commented Aug 20 at 14:28
  • You can also check this article firebirdsql.org/en/community-news/… where it is recommended to use same version of firebird server and client library Commented Aug 20 at 21:01

1 Answer 1

0

If you're using TCP/IP to communicate with Firebird servers (that is, use the <hostname>[/<port>]:<database> legacy URLs or the inet://, inet4:// or inet6:// URLs), you don't need to vary the VendorLib: use the latest Firebird client library for all your connections. The Firebird 5.0 client library is capable of talking to Firebird 1.0 and higher, as the protocol is versioned.

Sign up to request clarification or add additional context in comments.

1 Comment

I worked around this by manually defining the connection parameters for each connection, rather than using FireDAC's FDManager and named ConnectionDefs. I'm good now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.