Firebird + OSX + Interbase not a valid database [SOLVED] lazarus / 16-Databases ---------------------------------------------------------------------- timcs · 2014-02-19 21:31 Hi   I first had problems when trying to read in my interbase database into Lazarus with permission errors. On searching on Google and here, I managed to sort this out by applying user and group firebird privileges for the directories and file in question.   However I am now getting a new error which is DoInternal Connect :   -file /Users/fred/database/CATPASS.GDB is not a valid database. This interbase file was used with a Delphi program I wrote but to port this program onto other Windows PCs, I used the firebird engine and all worked fine.   Now that I am trying to port / re-write this same program for the Mac, the error I get mentioned above happens when I am in design mode and simple setting the IBConnection objects property connect to true.   I know that this file was copied originally from a Windows drive but I can access this file via virtualbox through Linux running Wine to then run my program. Something as you can imagine I what to change so that I can run it on the Mac Thanks TimCS ---------------------------------------------------------------------- mangakissa · 2014-02-20 11:09 I'm not an MAC user, but do you use the right client library? Interbase as well as Firebird are connecting through this. ---------------------------------------------------------------------- timcs · 2014-02-20 11:30 hi mangakissa   Thanks for getting back to me, when I installed Firebird there was no option to choose interbase on the Mac.  However now that you mention it, I do remember seeing this option when installing firebird on Windows with a choice of the GD32.dll (I think) or another option.  Maybe interbase libraries are not available on Mac which would be a shame as the database has data in it that I use and need. Thanks TimCS ---------------------------------------------------------------------- timcs · 2014-02-22 07:21 Since my last post have looked through documentation on the net from firebird but I cannot find whether or not Interbase is supported on the Mac.  Has anyone here been able to read an Interbase database on the Mac ? Thanks TimCS ---------------------------------------------------------------------- mangakissa · 2014-02-22 08:22 google interbase mac ? ---------------------------------------------------------------------- timcs · 2014-02-22 09:57 Quote from: mangakissa on February 22, 2014, 09:22:48 amgoogle interbase mac ?  yes did that to, all the software needs money which is not something I aim to pay out for when the program is for personal use.  Also I did think about converting the database to firebird but I cannot see to find a free Windows or Mac program that will do this. Any ideas and yes I googled for this to. Thanks TimCS ---------------------------------------------------------------------- howardpc · 2014-02-22 10:37 A possible solution would be to get your Delphi program to export CATPASS.GDB as an intermediate .csv file, which you could then import into your Mac program, saving it in a new database format for which you have Mac libraries. ---------------------------------------------------------------------- timcs · 2014-02-22 11:30 Quote from: howardpc on February 22, 2014, 11:37:41 amA possible solution would be to get your Delphi program to export CATPASS.GDB as an intermediate .csv file, which you could then import into your Mac program, saving it in a new database format for which you have Mac libraries. Thanks Howardpc for the idea I will need to try and find my Delphi software again , moved home, nothing is where it should be . I have found a trial program although it only exports 50 records which seems to have worked but buying it is a bit much for a one off. Could end up re-inputting , shame Firebird on the Mac does not support interbase , was hoping this to be an easy route to take Thanks TimCS ---------------------------------------------------------------------- timcs · 2014-02-24 17:12 I can read the interbase data into the Windows Lazarus fine, how would I best then read this data from Interbase into the firebird database? also there is a field in the Interbase database which is encrypted , am I best to decrypt it first and then save it to the firebird database encrypting it on the way through ? Thanks TimCS ---------------------------------------------------------------------- timcs · 2014-03-01 23:44 As I managed to find a solution for this by searching the net and trying various suggestions I'd thought I would post my findings on this here so if anyone else hit the same problem they had a "possible" answer for it.   I found that because the interbase database I had created was on an older version, firebird 2.5 would not read it. It so happens that the database header has a "ODS" version and to get this run : gstat -h This then gives an ODS version and visiting this site: http://www.ibase.ru/devinfo/prevver.htm Gives the versions of interbase and firebird that will open the database. For me , I had to go back to firebird 1.5 for Lazarus to open it. I have yet, however fully tested this database to see if my encrypted data field can be decrypted. Hope this is of help TimCS ---------------------------------------------------------------------- taazz · 2014-03-02 00:03 If I'm not mistaken you can upgrade the ods version by doing a database back & restore using the included command line tool (gbak or nback or something along those lines). ---------------------------------------------------------------------- timcs · 2014-03-02 08:00 Quote from: taazz on March 02, 2014, 01:03:09 amIf I'm not mistaken you can upgrade the ods version by doing a database back & restore using the included command line tool (gbak or nback or something along those lines). Thanks for that info taazz, currently working on 1.5 and so far seems to be okay. As this program is for personal use only I can put up with this now but I may give your suggestion a try at some point. I presume the backup and restore would both be done via the latest firebird tools ? Thanks TimCS ---------------------------------------------------------------------- taazz · 2014-03-02 08:41 If I'm not mistaken the backup doesn't matter which tools is used to take it but I would the latest tool for restore otherwise it would not know the latest ODS to create it. So far I have only done a backup with the current version and restore with the new version and it seems to work.