Recent

Author Topic: Is it possible to connect a 64-bit Lazarus application to Firebird 2.5?  (Read 4273 times)

Wladimir Kowtun

  • New member
  • *
  • Posts: 7
Hi, I'm trying to establish a connection to Firebird 2.5 with "IBConnection" on a 64-bit Larazus installation. Reading the documentation I see that a compatibility problem is generated with the Firebird library.

Is there a 64-bit equivalent to the gds32.dll file? What could I use in my 64-bit Lazarus installation? Or am I doomed to reinstall the 32-bit Lazarus version?

Thanks in advance for any guidance.

lucamar

  • Hero Member
  • *****
  • Posts: 4135
Wouldn't it be easier to install a 64 bit Firebird 2.5? Like, say, v2.5.9, which is the last of the series :-\
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Wladimir Kowtun

  • New member
  • *
  • Posts: 7
I don't know much about Firebird, but I think your comment gave me a better understanding of the matter. I imagine that it is not enough just to copy a dll in the application directory as in the case of SQLite, I imagine that to work with Firebird I need everything that the installer generates, I do not fully understand how Firebird works compared to databases like Postgres or MySQL.

My circumstance is that I intend to make an application that connects to the database of a POS program made in Delphi that is compiled in 32 bits and I imagine that if I reinstall the Firebird 64 bits client this program will not be able to connect to the database.

I could install my application on another PC where the POS system to whose database I need to connect is not installed and on that PC install the 64-bit Firebird client but...

It seems that the simplest and most logical thing is to stop fooling around and develop and compile my application in 32 bits. :)

Thanks for lending your time to newbies like me.

lucamar

  • Hero Member
  • *****
  • Posts: 4135
It all depends on your needs, but Firebird is very easy to "install" for, say, a simple application you could unzip the "embedded" kit in your application directory (more or less as if you were using, say, SQLite), giving you the option  of keeping your program as 64 bit while the Delphi keeps its own 32 bit install.

Read the documentation to find how all this works and don't desperate ;)

Though, of course, if you don't care whether your program is 32 or 64 bit, making it 32 bit might be the easiest solution, perhaps. Depends on how the Delphi program is using Firebird, whether a standard server or an embedded one.

ETA: Forgot to add -- If you want an overview of how Firebird works for a Lazarus application see the wiki page on Firebird
« Last Edit: May 20, 2021, 09:57:50 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1042
Hi, I'm trying to establish a connection to Firebird 2.5 with "IBConnection" on a 64-bit Larazus installation. Reading the documentation I see that a compatibility problem is generated with the Firebird library.
Is there a 64-bit equivalent to the gds32.dll file? What could I use in my 64-bit Lazarus installation? Or am I doomed to reinstall the 32-bit Lazarus version?
Thanks in advance for any guidance.

I don't know much about Firebird, but I think your comment gave me a better understanding of the matter. I imagine that it is not enough just to copy a dll in the application directory as in the case of SQLite, I imagine that to work with Firebird I need everything that the installer generates, I do not fully understand how Firebird works compared to databases like Postgres or MySQL.
My circumstance is that I intend to make an application that connects to the database of a POS program made in Delphi that is compiled in 32 bits and I imagine that if I reinstall the Firebird 64 bits client this program will not be able to connect to the database.
I could install my application on another PC where the POS system to whose database I need to connect is not installed and on that PC install the 64-bit Firebird client but...
It seems that the simplest and most logical thing is to stop fooling around and develop and compile my application in 32 bits. :)
Thanks for lending your time to newbies like me.
First, change IBConsole (for Interbase) for a fresh new release of FlameRobin (for Firebird):
http://www.flamerobin.org/
https://github.com/mariuz/flamerobin/releases/tag/0.9.3.7

Second, you can have everything on 32 bits or everything on 64 bits or mix them up.

Although Firebird can be embeded such as SQLite, Firebird works mainly such as PostgreSQL, MySQL or MariaDB, which means it needs two parts to work in a client/server way.
https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/Firebird-2.5.9.27139-0_Win32_embed.zip
https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/Firebird-2.5.9.27139-0_x64_embed.zip


All you need is understand that Firebird's client and server are independent (bitness) of each other even when working together on the same machine:
- Install Firebird (it doesn't matter being 32 or 64 bits);
- Install FlameRobin (it doesn't matter being 32 or 64 bits);
- Install Lazarus (it doesn't matter being 32 or 64 bits);
- Then copy fbclient.dll (links bellow) of the same bitness of your FlameRobin to its binary folder;
- And finally put fbclient.dll of the same bitness of your Lazarus to its binaries folder or to your project's folder;

https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/Firebird-2.5.9.27139-0_Win32.zip
https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/Firebird-2.5.9.27139-0_x64.zip


Of course, as @lucamar already said: your life will be much easier if you use the same bitness for everything.
Quote
Thanks for lending your time to newbies like me.
No problem at all being newbie!
Be welcome!

Wladimir Kowtun

  • New member
  • *
  • Posts: 7
Ohhhh  :o thank you all for the information, all this time I had not understood what "embedded" meant. Definitely the most important thing is not what we have not yet learned but what we do not know that we do not know. Thanks for the light. I really appreciate your comments, they are helping me a lot.   :)

 

TinyPortal © 2005-2018