Wich from LCL to use for work with Firebird lazarus / 16-Databases ---------------------------------------------------------------------- finalist · 2011-04-08 05:26 I would like to work with Firebird Database. Wich components to use ? Thank you ! ---------------------------------------------------------------------- hallenberger · 2011-04-08 06:09 Hello! I use the uib-components in Lazarus and Delphi. Works fine. http://www.progdigy.com/?page_id=5 ---------------------------------------------------------------------- Arbee · 2011-04-08 19:19 The SQLDB component works fine with Firebird.  Comes bundled with Lazarus, although I think it is not pre-installed. The free ZEOS package works too.  If you're using FB 2.5 then you should use the 7.0.0 release in that case.  FB2.1 and earlier work with versions 7.0.0 and 6.6. ---------------------------------------------------------------------- finalist · 2011-04-09 06:16 Thank you. I see, there are SQLdb and Zeos Access components, waiting for me to use them Everithing will be o.k. I suppose. ---------------------------------------------------------------------- finalist · 2011-04-09 21:49 At Design-Time: 1. IBConnection, fill-up the properties IBConnection.Connected := True; - I see it is True 2. SQLTransaction.Active := True; - ( Automatic is True ) Problem: 3. SQLQuery.Active := True; - but it does not become as True (becomes back as False) DeleteSQL := 'DELETE FROM PLAYERS WHERE PLAYER = :PLAYER'; InsertSQL := 'INSERT INTO PLAYERS VALUES (:PLAYER,  :TEAM,  :FROM_YEAR,  :TO_YEAR,  :MATCHES,  :GOALS)'; UpdateSQL := 'UPDATE PLAYERS SET (TEAM = :TEAM,  FROM_YEAR = :FROM_YEAR,  TO_YEAR = :TO_YEAR,  MATCHES = :MATCHES,  GOALS = :GOALS) WHERE PLAYER = :PLAYER'; I don't understand the reason for that behavior. Can anybody help me about this problem ? Thank you ! ---------------------------------------------------------------------- Zoran · 2011-04-10 04:37 I assume that in SQL property you have "SELECT * FROM PLAYERS". First, does it work if you remove code from DeleteSQL, InsertSQL and UpdateSQL properties? Can you set SQLQuery.Active? ---------------------------------------------------------------------- finalist · 2011-04-10 06:14 SQL is set to "SELECT * FROM PLAYERS" I Can not set SQLQuery.Active to True; After I removed code from DeleteSQL, InsertSQL and UpdateSQL properties, SQLQuery.Active can not be set to True. ( I can open Database using IBExpert, I can see data into Table PLAYERS, I can see information about Database is Server version 2.1 (Firebird) ) ---------------------------------------------------------------------- Arbee · 2011-04-11 13:11 You don't get any error message when you try to open the query? have you tried doing it programmatically (like coding a "SQLQUERY.OPEN" in - for instance - the form's onCreate event).  No error then? By the way ... what platform and Lazarus/FPC are we talking here? ---------------------------------------------------------------------- marcov · 2011-04-11 13:29 Did you copy the FB client DLL to the application directory? ---------------------------------------------------------------------- finalist · 2011-04-11 14:22 I don't get any error message when I try to open the query. I tried doing it programmatically by: Code: [Select]procedure TForm_Firebird.FormCreate(Sender: TObject); begin   DBFolder := ExtractFilePath(Application.ExeName) + 'DB';   IBConnection.DatabaseName := DBFolder + '\SCORERERS.FDB';   Edit.Text := DBFolder + '\SCORERERS.FDB';   IBConnection.HostName := '';  // 'localhost';   IBConnection.UserName := 'SYSDBA';   IBConnection.Password := 'masterkey';   IBConnection.Connected := True;   SQLQuery.Active := True;   (*   ZConnection.Database := DBFolder + '\SCORERERS.FDB';   ZConnection.HostName := '';   ZConnection.User := 'SYSDBA';   ZConnection.Password := 'masterkey';   ZConnection.Connected := True;   *) end;The behavior I describe is under 64 bits Windows 7. I have installed Code Typhon Center ver.1.20 for Win64, but I have 2  options: 1. Lazarus for Win64; 2. Lazarus for Win32 (Active) ver.0.9.29; I have Free Pascal ver.1.0.12 2010.12.30; Both are installed under Code Typhon. The reason I did install Code Typhon is, I could not install Lazarus under Windows 7 ( at the end of 2010 year ). ( I have 32 bits Windows XP installed on another partition on the same PC. Yesterday I did try to compile and start without success the same programm code, there was error message, but I forgot it ). I did not copy the FB client DLL to the application directory, I did copy it to the Database directory ( may be it is my mistake ). ---------------------------------------------------------------------- Arbee · 2011-04-11 16:03 You are using FB embedded by the looks of it? Have you also tried storing the DLL in the Windows directory? (I guess it still exists in W7 ... personally I still trail behind on XP) ---------------------------------------------------------------------- finalist · 2011-04-11 17:00 I don't use FB embedded. I have Firebird_2_1 installed. Before a minutes: 1. I did copy fbclient.dll from C:\Program Files (x86)\Firebird\Firebird_2_1 to the Desktop; 2. Made fbclientD.dll as a copy of fbclient.dll; 3. Copy both fbclientD.dll and fbclient.dll into: 3.1. Database directory, test with the program = without success; 3.2. Application directory, test with the program = without success; 3.3. Windows\ directory, test with the program = without success; 3.4. Windows\System32\ directory, test with the program = without success; ---------------------------------------------------------------------- Arbee · 2011-04-11 18:57 But if you do not use FB Embedded, you should fill the hostname with 'localhost'. Leaving the hostname empty will persuade SqlDb to try and use FB embedded.  An that requires some more DLL files than just a client dll. ---------------------------------------------------------------------- Arbee · 2011-04-11 19:20 What I forgot to mention... I think for IBConnection the DLL must be renamed to gds32.dll.  It is the old name for the Interbase DLL. ---------------------------------------------------------------------- finalist · 2011-04-11 19:53 Unfortunately I did change HostName to 'localhost', but it was not raise opening of SQLQuery. May be I need to fill again DeleteSQL, InsertSQL and ModifySQL properties of the SQLQuery. ---------------------------------------------------------------------- Zoran · 2011-04-11 20:02 Quote from: Arbee on April 11, 2011, 09:20:26 pmWhat I forgot to mention... I think for IBConnection the DLL must be renamed to gds32.dll.  It is the old name for the Interbase DLL. I don't think so. I think fbclient.dll is okay with IBConnection. But, after I installed FB-64bit on Win7, I had to execute something from command line and only then the fbclient.dll was installed to correct "system" folder (there seems to be more than one "system"-like folder on 64-bit Win7). Open command line, somewhere under your fb folder, iirc you can find a folder named like 64 something, Execute what is there with correct parameters. I can't tell you exactly what it was, now I don't have 64 bit windows here. Tommorow morning, at work, I'll see and post here what it actually is. ---------------------------------------------------------------------- Zoran · 2011-04-11 20:03 Quote from: finalist on April 11, 2011, 09:53:11 pmUnfortunately I did change HostName to 'localhost', but it was not raise opening of SQLQuery. May be I need to fill again DeleteSQL, InsertSQL and ModifySQL properties of the SQLQuery. No. You surely don't need those for opening a select query. Let's better take one step at a time. ---------------------------------------------------------------------- Zoran · 2011-04-11 20:14 Now I remembered that you said that you don't have a problem to connect the IBConnection component, so I'd say there is no problem with client dll. You have the problem to open the query. Strange... ---------------------------------------------------------------------- finalist · 2011-04-11 20:58 It is terribly strange .. I will test this code under Linux Ubuntu 10.04. ---------------------------------------------------------------------- finalist · 2011-04-12 07:42 The behavior of the same components under Lazarus is different : When I try at Design-time to connect IBConnection, I get an Error mrssage: 'Can not load default Firebird clients ("libgds.so" or "libfbclient.so"). Check your installation' ( I did copy libfbclient.so into the Application folder, but it raises the same error-message .. ) ---------------------------------------------------------------------- marcov · 2011-04-12 08:24 Quote from: Zoran on April 11, 2011, 10:02:02 pmQuote from: Arbee on April 11, 2011, 09:20:26 pmWhat I forgot to mention... I think for IBConnection the DLL must be renamed to gds32.dll.  It is the old name for the Interbase DLL. I don't think so. I think fbclient.dll is okay with IBConnection. With modern versions (2.4.x series used by 0.9.30) of Lazarus/FPC it is. Don't know about years old versions like 2.2.4. ---------------------------------------------------------------------- avra · 2011-04-12 09:45 Quote from: finalist on April 11, 2011, 04:22:08 pmI have installed Code Typhon Center ver.1.20 for Win64Do you know that there is CodeTyphon 1.50? Quote from: finalist on April 11, 2011, 04:22:08 pmI did not copy the FB client DLL to the application directory, I did copy it to the Database directory (may be it is my mistake).Do you have any SQL manager os some other independent software that can successfully browse your FB tables? ---------------------------------------------------------------------- finalist · 2011-04-12 09:50 Quote from: avra on April 12, 2011, 11:45:01 amQuote from: finalist on April 11, 2011, 04:22:08 pmI have installed Code Typhon Center ver.1.20 for Win64Do you know that there is CodeTyphon 1.50? Quote from: finalist on April 11, 2011, 04:22:08 pmI did not copy the FB client DLL to the application directory, I did copy it to the Database directory (may be it is my mistake).Do you have any SQL manager os some other independent software that can successfully browse your FB tables? I will be very happy to work with CodeTyphon 1.50. I will be thankful about a link to download it. I have IBExpert manager, I can browse my FB tables, I see information posted in the tables, there is no problem. ---------------------------------------------------------------------- avra · 2011-04-13 06:45 Quote from: finalist on April 12, 2011, 11:50:50 amI will be very happy to work with CodeTyphon 1.50. I will be thankful about a link to download it.http://www.pilotlogic.com/sitejoom/index.php?option=com_co ntent&view=article&id=96&catid=68&Itemid=147 ---------------------------------------------------------------------- finalist · 2011-04-13 07:26 Quote from: avra on April 13, 2011, 08:45:19 am.... http://www.pilotlogic.com/sitejoom/index.php?option=com_content&view=a rticle&id=96&catid=68&Itemid=147 Tnak you very much ! ---------------------------------------------------------------------- finalist · 2011-04-13 20:48 I did install CodeTyphon 1.50. My terrible application did not work again. But I did decide to install CodeTyphon 1.50 on my old computer. I did it and I did create a totally new simple application using the same SQLdb components for work with Firebird database. I did create a new Firebird database. It was a happy Idea, because it was successful at Design-time, it was successful later at Run-time. Then I did copy this happy Application on my current Computer. It was a successful test. So, I don't know what is the reason, but now I can work with CodeTyphon 1.50 and SQLdb components connected to Firebird database. Thank you very much everybody