Driver loading issue when connecting to PostgreSQL after connecting to Oracle

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 766
Joined: 18.11.2018, 17:37
Location: Hungary

Re: Driver loading issue when connecting to PostgreSQL after connecting to Oracle

Post by aehimself »

Fr0sT wrote: 23.11.2020, 15:35No matter how many times LoadLibrary is called, Windows only loads single instance of a lib. Different handles just point to the same object. Moreover, FreeLibrary cares about ref counter as well. So it's enough for driver object to call FreeLibrary on destroy.
I actually did not know about this behavior. I'll attempt to make this change and then test if it works as expected. Thanks for the hint!

P.s.: Where have you been?! Didn't see you here for ages now!
Delphi 12.1, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmariadb.dll 3.3.8
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.13
- MSSQL 2012, 2019; sybdb.dll FreeTDS_2435
- SQLite 3.45.2
Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 280
Joined: 08.05.2014, 12:08

Re: Driver loading issue when connecting to PostgreSQL after connecting to Oracle

Post by Fr0sT »

aehimself wrote: 23.11.2020, 16:06 P.s.: Where have you been?! Didn't see you here for ages now!
For some time I only been at Praxis and then got ill and isolated for 2w for wearing a Corona :/
Post Reply