Subject Re: [firebird-python] Fwd: Python cannot find path to fbclient
Author Pavel Cisar
Hi,

FDB uses ctypes.find_library() to locate the client library, see
https://docs.python.org/3.6/library/ctypes.html for details how this
works. If Firebird (or at least the Firebird client) is installed
normally on your local computer, then fbclient.dll should be located
just fine.

Alternatively you can pass client library spec to fdb.connect(), or use
fdb.load_api() before any call that uses FDB (typically connect) that
allows you to specify the client library location. See
https://fdb.readthedocs.io/en/v2.0/reference.html#fdb.load_api

BTW, "host" is the specification of server machine (typically tcp/ip
address), so host='C://' does not makes sense.

best regards
Pavel Cisar
IBPhoenix

Dne 26.8.2018 v 11:14 Philip Godkin philip.godkin@...
[firebird-python] napsal(a):
> Windows Server 2012
> Firebird 2.5
> Python3.6.5
>
> Hope someone can help, I can am trying to connect to a database on my
> server i keep getting this message, i have checked windows/system32 and
> windows/sysWOW64 and both have the fbclient.dll file, this file is also in
> the bin of the Firebird. I am running this code on the server as well
>
> code
> import fdb
>
> con = fdb.connect(
> host='C://', database='C://ITServer//dbname.FDB',
> user='sysdba', password='masterkey',charset = 'none')
>
> cur = con.cursor()
>
> cur.excute("select * from ADDRESSCOUNTIES")
> print(cur.fetchone)
>
>
> Result
>
> Traceback (most recent call last):
> File "C:\Users\Administrator\Desktop\Python\Firebird\Test.py", line 6, in
> <module>
> user='sysdba', password='masterkey',charset = 'none')
> File
> "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fdb\fbcore.py",
> line 784, in connect
> load_api(fb_library_name)
> File
> "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fdb\fbcore.py",
> line 220, in load_api
> setattr(sys.modules[__name__], 'api',
> ibase.fbclient_API(fb_library_name))
> File
> "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fdb\ibase.py",
> line 1386, in __init__
> raise Exception("The location of Firebird Client Library could not be
> determined.")
> Exception: The location of Firebird Client Library could not be determined.
>
>
>
> thanks in advance
>