FirebirdSQL / fdb

Firebird Driver for Python
https://www.firebirdsql.org/en/devel-python-driver/
Other
60 stars 26 forks source link

Multiple Firebird Instances #98

Closed eko234 closed 3 years ago

eko234 commented 3 years ago

I can't find a way to handle multiple firebird instances, I currently have Firebird 2, 3 and 4 and when I try to connect it seems that fdb can't find the right dll, Is there a way to specify which dll to use when establishing a connection?

mrotteveel commented 3 years ago

This sounds more like a support question, and would therefor be better asked on https://groups.google.com/g/firebird-python (though as of yet, that group is very quiet). In any case, you can use the latest fbclient.dll to connect to any Firebird installation (assuming you don't want to use Firebird Embedded). Having the client library installed (e.g. using the Firebird installer) should be sufficient.

You can use fdb.load_api to load a specific client library (or use the connection property fb_library_name), but keep in mind that the first library loaded (either using load_api or the first connection with fb_library_name) will be used for all connections.

eko234 commented 3 years ago

This sounds more like a support question, and would therefor be better asked on https://groups.google.com/g/firebird-python (though as of yet, that group is very quiet). In any case, you can use the latest fbclient.dll to connect to any Firebird installation (assuming you don't want to use Firebird Embedded). Having the client library installed (e.g. using the Firebird installer) should be sufficient.

You can use fdb.load_api to load a specific client library (or use the connection property fb_library_name), but keep in mind that the first library loaded (either using load_api or the first connection with fb_library_name) will be used for all connections.

mmm, I see, thanks, now I'm getting a WinError 193, but I will work it out, thanks fren.

mrotteveel commented 3 years ago

WinError 193, IIRC, generally means you're trying to load a 32-bit library in a 64-bit application (or a 64-bit library in a 32-bit application). Check the bitness of your Python installation, and make sure you have a fbclient.dll of the appropriate bitness.

eko234 commented 3 years ago

WinError 193, IIRC, generally means you're trying to load a 32-bit library in a 64-bit application (or a 64-bit library in a 32-bit application). Check the bitness of your Python installation, and make sure you have a fbclient.dll of the appropriate bitness.

hahaa you got me typing "Just so anyone gets the same error, the issue was the bitness difference between python and the dll..", thank you again.