Recent

Author Topic: Firebird database  (Read 31089 times)

finalist

  • Jr. Member
  • **
  • Posts: 99
Firebird database
« on: October 25, 2009, 10:43:50 pm »
I am absolutely beginner with Lazarus ....
Please explain to me how to connect and work with Firebird database using a Lazaruz project.
Wich components to use ?
If I need 3-rd party components, please provide me links about to download these components.
Thank you!

clauslack

  • Sr. Member
  • ****
  • Posts: 275
Re: Firebird database
« Reply #1 on: October 25, 2009, 10:53:20 pm »
Here is an example of Firebird with Lazarus(SqlDb - need 3-rd party components).

http://www.lazarus.freepascal.org/index.php/topic,7246.msg34315.html#msg34315

In this forum there are a lot of info about Firebird - Lazarus (Sqldb, Zeos, etc)

Regards

finalist

  • Jr. Member
  • **
  • Posts: 99
Re: Firebird database
« Reply #2 on: October 25, 2009, 11:24:13 pm »
Here is an example of Firebird with Lazarus(SqlDb - need 3-rd party components).

http://www.lazarus.freepascal.org/index.php/topic,7246.msg34315.html#msg34315

In this forum there are a lot of info about Firebird - Lazarus (Sqldb, Zeos, etc)

Regards
Thank you very much !!!!
I did change 3 lines in the example, and the SQL query into Memo1.Lines and it did open my table from my Firebird database !!!
It works without any 3-rd party components ....

clauslack

  • Sr. Member
  • ****
  • Posts: 275
Re: Firebird database
« Reply #3 on: October 26, 2009, 12:55:59 am »
You right; sqldb come with FreePascal,  NO need 3-rd party components.

Be carefull with this issue from SqlDb http://bugs.freepascal.org/view.php?id=12956

but you can make a couple of workarround.
 
I use this with Linux and Windows, and works fine.
Regards

finalist

  • Jr. Member
  • **
  • Posts: 99
Re: Firebird database
« Reply #4 on: October 26, 2009, 09:49:09 pm »
1. The example works under Windows XP Pro [32bit] and Firebird 2.1.3 [32bit];
2. The example did not work under Windows 7 Pro [64bit] and Firebird 2.1.3 [64bit] - there is a message:
Can not load default Firebird clients ("gds32.dll" or "fbclient.dll"). Check your installation.
« Last Edit: October 26, 2009, 10:28:23 pm by finalist »

clauslack

  • Sr. Member
  • ****
  • Posts: 275
Re: Firebird database
« Reply #5 on: October 26, 2009, 10:06:22 pm »
In Windows 7 Pro [64bit] search the library fbclient.dll (from the installation of Firebird, or download from Firebird) and copy this to c:\windows\system32 (or your windows system directory)
I believe the 32-bit version works on 64 bits. But there is also a 64-bit on the Firebird website.(I think)

Another thing, is that the client fbclient.dll  uses the runtime Visual C 8, firebird has a MSI vccrt8_Win32.msi (msvcp80.dll,msvcr80.dll). But Windows 7 must have this runtime.(search for this)

Check that and nothing more.
Regards.

finalist

  • Jr. Member
  • **
  • Posts: 99
Re: Firebird database
« Reply #6 on: October 26, 2009, 11:59:30 pm »
I can not solve this, sorry ....
I did copy a working example built under Win XP Pro 32bit into Win 7 Pro 64bit and it works fine.
Bu I can not compile the same code under Win 7 Pro 64bit.
I think there is a bug into 64bit version of component, I'm not sure but ....

clauslack

  • Sr. Member
  • ****
  • Posts: 275
Re: Firebird database
« Reply #7 on: October 27, 2009, 12:17:11 am »
Sorry
I do not understand.

The example works under Win 7 Pro 64bit?
You install Lazarus under Win 7 Pro 64bit and not compile?
What is exactly the errror?
Look at this
http://www.lazarus.freepascal.org/index.php/topic,7190.0.html



finalist

  • Jr. Member
  • **
  • Posts: 99
Re: Firebird database
« Reply #8 on: October 27, 2009, 07:28:20 am »
I have 2 computers:
1. Laptop under Windows XP Pro [32 bits] - installed Lazarus [32 bits] and Firebird 1.6;
2. Desktop under Windows 7 Pro [64 bits] - installed Lazarus [64 bits] and Firebird 2.1;

First I compiled the example on the Laptop and it was successful - i did change in example only the name of database, username and password, because these data was about another kind of database. I did change the SQL Query to open an existing table in my Firebird database. No more changes ....
Aftef successful compilation and work of the example, I posted a comment into the forum, that it works o.k.
Next day I decided to try out compilation by the Desktop computer. I did copy the source files there and did compile successful, but there was a message, when I did try to Run:
Can not load default Firebird clients ("gds32.dll" or "fbclient.dll"). Check your installation.
Then I did copy the cmpiled on the Laptop sql.exe and Firebird database from the Laptop to the Desktop computer - this works o.k on the Desktop.
That's it.
« Last Edit: October 27, 2009, 09:03:06 am by finalist »

clauslack

  • Sr. Member
  • ****
  • Posts: 275
Re: Firebird database
« Reply #9 on: October 27, 2009, 12:38:51 pm »
And, the compiled in Desktop, run without the Lazarus IDE?

Anyway.
Can not load default Firebird clients ("gds32.dll" or "fbclient.dll"). Check your installation.
Means

- fbclient.dll does not exit (in the correct path, same directory o windows system directory)
- fbclient.dll not load because there a missing requerid library (runtime Microsoft Visual Studio 2005-msvcp80.dll,msvcr80.dll)

Check path, version of fbclient.dll and runtime Microsoft Visual Studio 2005 in Desktop.

 %)

finalist

  • Jr. Member
  • **
  • Posts: 99
Re: Firebird database
« Reply #10 on: October 27, 2009, 03:09:07 pm »
Compiled in Desktop sql.exe has the same message ... can not find "fbclient.dll"
Compiled in Laptop sql.exe works fine - this application CAN FIND "fbclient.dll"
My opinion is that Lazarus [64 bits] has a problem with Firebird 2.1.3

clauslack

  • Sr. Member
  • ****
  • Posts: 275
Re: Firebird database
« Reply #11 on: October 27, 2009, 03:35:30 pm »
Now I understand that, but in Desktop you found fbclient.dll?

Check path, version of fbclient.dll and runtime Microsoft Visual Studio 2005 in Desktop.

You can try in firebird site, for client fbclient.dll of windows 64 bits.

finalist

  • Jr. Member
  • **
  • Posts: 99
Re: Firebird database
« Reply #12 on: October 27, 2009, 03:54:57 pm »
Compiled in Desktop sql.exe has the same message ... can not load "fbclient.dll" in Desktop computer;
Compiled in Laptop sql.exe works fine - this application CAN LOAD "fbclient.dll" in Desktop computer;
I have installed Firebird-2.1.3.18185_0_Win32, now I will try in firebird site, for client fbclient.dll of Windows 64 bits.
Thanks!

clauslack

  • Sr. Member
  • ****
  • Posts: 275
Re: Firebird database
« Reply #13 on: October 27, 2009, 04:14:19 pm »
Forget the compiler.
Forget Lazarus.

The point is the missing fbclient.dll  (is not a Lazarus/fpc problem) in Desktop.

Search in Windows Menu Find Files the fbclient.dll
if found fbclient.dll
- Check version (2.1,1.5,etc)
- Check if 32 bits.
- Check for (Microsoft Visual Studio 2005-msvcp80.dll,msvcr80.dll)

Another easy check is:
copy fbclient.dll,msvcp80.dll,msvcr80.dll in the same directory that sql.exe and run (without Lazarus)

good luck...


finalist

  • Jr. Member
  • **
  • Posts: 99
Re: Firebird database
« Reply #14 on: October 27, 2009, 05:11:24 pm »
I have only:

C:\Program Files (x86)\Firebird\Firebird_2_1\bin\fbclient.dll
version 2.1.3.18185

and

C:\Windows\System32\msvcp60.dll
version 7.0.7600.16385
« Last Edit: October 27, 2009, 05:27:32 pm by finalist »

 

TinyPortal © 2005-2018