Flash Filer lazarus / 16-Databases ---------------------------------------------------------------------- Crystal_Ra · 2010-02-12 14:09 Hello everyone. Tell us whether there is a port for Flash Filer from TurdoPower? for Lazarus ? ---------------------------------------------------------------------- tatamata · 2010-02-12 21:01 As far as I know, there is none. You should satisfy yourself with other open-source databases. ---------------------------------------------------------------------- Crystal_Ra · 2010-02-12 23:23 Flash Filer from TurdoPower - the best quick solution for Pascal ... as a client-server and as a built-in solution ... pity that he is not ported so far ... have to go back to Delphi ---------------------------------------------------------------------- tatamata · 2010-02-13 08:10 Why don't you try with Firebird? It, also, has both server and embedded version and is very well supported for Lazarus (especially with trhird-party Zeosdbo package). ---------------------------------------------------------------------- teos · 2012-08-07 18:30 Firebird is OK but how about a client-server with Firebird server with other databases on the same server or how about user/password management? I look forward to the conversion of either FlashFiler or FFSQL to Lazarus so not only the client is at my control but also the server is. O and I forget: Firebird as mentioned before is running on Windows.. Strange that in these discussions about Flash Filer allways the Sr. Members suggest Firebird and even crappy workarounds like an emulator. ;-D ---------------------------------------------------------------------- tatamata · 2012-08-07 20:04 Quote from: teonieuwlande on August 07, 2012, 08:30:24 pmFirebird is OK but how about a client-server with Firebird server with other databases on the same server or how about user/password management? I look forward to the conversion of either FlashFiler or FFSQL to Lazarus so not only the client is at my control but also the server is. O and I forget: Firebird as mentioned before is running on Windows.. Strange that in these discussions about Flash Filer allways the Sr. Members suggest Firebird and even crappy workarounds like an emulator. ;-D You can always try to port it by your own effort. I tried once and didn't succeed... Embedded database "servers" written in Pascal are most welcome. You can improve some of very few existing solutions or start brand new project from scratch. Or you can stick to wrappers around very well known non-pascal databases, such as Firebird, Postgresql etc... ---------------------------------------------------------------------- teos · 2012-08-20 15:07 I'm very interested in code from your attempts. But I know the code from porting it to Delphi 2007, it's quite complex and full of pointers. Meanwhile I'm working on a client-server engine for SQLite with Indy and Zeos. The base is ready, I have to implement master-detail, record locks, automatic updates and user control. The next after that will be a maintenance tool. ---------------------------------------------------------------------- BigChimp · 2012-08-20 15:19 Hi teo, Noticed you've been inundating the db section with news of your indy- based new efforts Quote from: teonieuwlande on August 07, 2012, 08:30:24 pmFirebird is OK but how about a client-server with Firebird server with other databases on the same server or how about user/password management? I look forward to the conversion of either FlashFiler or FFSQL to Lazarus so not only the client is at my control but also the server is. Having a completely pascal SQL-capable client/server database system would be kind of cool, yes. The questions is, would average users see benefits over existing solutions (sqlite, Firebird embedded, Firebird and other client/server)? I wonder. But enthousiasts writing their own solution can be a powerful force If you are going to do something like that, perhaps starting with the tdbf components (advantage: standard though old format, so interoperable with other tools) or tatamata's zmsql might me nice... Quote from: teonieuwlande on August 07, 2012, 08:30:24 pmO and I forget: Firebird as mentioned before is running on Windows.. As mentioned before? By whom? Where? I don't get what you mean. Firebird can run on Windows, Linux, OSX, Solaris,.... Quote from: teonieuwlande on August 07, 2012, 08:30:24 pmStrange that in these discussions about Flash Filer allways the Sr. Members suggest Firebird and even crappy workarounds like an emulator. ;-D I think that is because Firebird just works very well, can switch from embedded to client/server without recompile, has user management built in (IIRC since 2.5 quite complete using SQL statements). Ludob wrote a services API wrapper that lets you easily do backup/restore etc. This is available in recent FPC/Lazarus (also with examples). Why reinvent the wheel? Client/server with Firebird and other database servers? 2 phase commit and stuff? Well if you need things like that, obviously you'd have to code for it. But isn't flash filer some kind of file-based db? Bit strange to go from that to multiple dbs? Oh, and if you don't like Firebird, use PostgreSQL. Or TDBF. Or sqlite3. Or Oracle. Or MS SQL Server. Or another ODBC-accessible database. Or even mysql... ---------------------------------------------------------------------- TurboRascal · 2012-08-20 16:18 FlashFiler? I liked the idea of porting it too, but after looking at the source it seemed too complex for me to dabble... Embedded Firebird is also nice, but AFAIK doesn't work under Linux so it's not a cross-platform solution for a local database. TDbf is unmaintained and it doesn't have any server mode anyway. SQLite can be an excellent solution, but switching to a full server most often needs SQL modifications. So, I'd say we are still missing a nice crossplatform DBMS which works both local and as server. Especially something originally TDataset- based like FlashFiler is... ---------------------------------------------------------------------- BigChimp · 2012-08-20 17:44 Quote from: TurboRascal on August 20, 2012, 06:18:26 pmEmbedded Firebird is also nice, but AFAIK doesn't work under Linux It should. It's still in my to-do list to set up based on the instructions for C++ and older Firebird version and document for current versions with FPC/Lazarus. Sqlite in server mode? How does that work? You presumably mean that when switching from sqlite to another,  client/server db, you'll need modifications, right? ---------------------------------------------------------------------- TurboRascal · 2012-08-20 18:07 Quote from: BigChimp on August 20, 2012, 07:44:13 pmSqlite in server mode? How does that work? You presumably mean that when switching from sqlite to another,  client/server db, you'll need modifications, right? Yes, that's what I meant. Since sqlite has no server mode I must switch to a full RDBMS like, say Postgres, and that means different SQL dialect. Even worse would be to create a standalone application from the client-server based one - if it uses some advanced features which sqlite lacks, but a complex application would make good use of. ---------------------------------------------------------------------- denver · 2012-08-20 18:50 Quote from: teonieuwlande on August 20, 2012, 05:07:15 pmMeanwhile I'm working on a client-server engine for SQLite with Indy and Zeos. The base is ready, I have to implement master-detail, record locks, automatic updates and user control. The next after that will be a maintenance tool. Quite agree with teonieuwlande, client-server engine with Indy and Zeos , a 3-tier structure is very good for today requiement. I also tested some code for Indy + Zeos, the performance is awesome. I used Flash Filer  few year ago, the performance is much slower than the Indy + Zeos approach.   A lot of afford is needed to port flash filer to fpc, why not use the less afford to try Indy + Zeos approach . ---------------------------------------------------------------------- teos · 2012-08-20 19:04 SQLite in Server mode. Yes. That is what I tell you folks. SQLLite is used as backend, as engine behind my code. What is done: data is fetched by using an in-memory dataset and sent to the client. Clients do not send datasets, they send plain SQL. So there is 1 read and 1 commit in this entire situation. And since SQLite is backend, it's no problem to use data in a standalone situation. Who reads this and is somewhat familiar with FlashFiler: the workings are about the same. Also applies to Firebird and the others. But those others need a library (DLL) on Windows for all client computers. My approach only has a library on the server. And if I'm happy with the solution, I will look at compiling SQLite in my code. The advantage: everything is native Delphi. There is one catch though: I'm not sure if my code will be open source or GPL. ---------------------------------------------------------------------- teos · 2012-08-20 19:33 Quote from: TurboRascal on August 20, 2012, 08:07:48 pmQuote from: BigChimp on August 20, 2012, 07:44:13 pmSqlite in server mode? How does that work? You presumably mean that when switching from sqlite to another,  client/server db, you'll need modifications, right? Yes, that's what I meant. Since sqlite has no server mode I must switch to a full RDBMS like, say Postgres, and that means different SQL dialect. Even worse would be to create a standalone application from the client-server based one - if it uses some advanced features which sqlite lacks, but a complex application would make good use of. Yep. I think Postgress wil do fine. SQL differences.. well.. they are not THAT big. ---------------------------------------------------------------------- tatamata · 2012-08-20 19:38 Quote from: teonieuwlande on August 20, 2012, 05:07:15 pmI'm very interested in code from your attempts. Sorry, I don't have it anymore, it was long time ago. And in menatime, I rather made my own "database" - zmsql , as you already know http://sourceforge.net/projects/lazarus-ccr/files/zmsql/ http://wiki.lazarus.freepascal.org/ZMSQL ---------------------------------------------------------------------- teos · 2012-08-20 19:43 Quote from: BigChimp on August 20, 2012, 05:19:48 pmHi teo, Noticed you've been inundating the db section with news of your indy- based new efforts Quote from: teonieuwlande on August 07, 2012, 08:30:24 pmFirebird is OK but how about a client-server with Firebird server with other databases on the same server or how about user/password management? I look forward to the conversion of either FlashFiler or FFSQL to Lazarus so not only the client is at my control but also the server is. Having a completely pascal SQL-capable client/server database system would be kind of cool, yes. The questions is, would average users see benefits over existing solutions (sqlite, Firebird embedded, Firebird and other client/server)? I wonder. But enthousiasts writing their own solution can be a powerful force If you are going to do something like that, perhaps starting with the tdbf components (advantage: standard though old format, so interoperable with other tools) or tatamata's zmsql might me nice... I don't look at developers as standard users. Firebird Embedded you say does not run on Linux. The others need a DLL of some kind. And I suppose Firebird or another server running a database will provide security issues. Take a look at DBISAM VCL on Windows/Delphi or ElevateDB, FlashFiler, Nexus and get the idea. Quote from: teonieuwlande on August 07, 2012, 08:30:24 pmO and I forget: Firebird as mentioned before is running on Windows.. As mentioned before? By whom? Where? I don't get what you mean. Firebird can run on Windows, Linux, OSX, Solaris,.... [/quote] I just read somewhere that Embedding Firebird has it's issues. And Embedded Firebird still requires a library/dll to run.. Quote from: teonieuwlande on August 07, 2012, 08:30:24 pmStrange that in these discussions about Flash Filer allways the Sr. Members suggest Firebird and even crappy workarounds like an emulator. ;-D QuoteI think that is because Firebird just works very well, can switch from embedded to client/server without recompile, has user management built in (IIRC since 2.5 quite complete using SQL statements). Ludob wrote a services API wrapper that lets you easily do backup/restore etc. This is available in recent FPC/Lazarus (also with examples). Why reinvent the wheel? It is not about inventing the weel, more about stopping with work arounds. QuoteClient/server with Firebird and other database servers? 2 phase commit and stuff? Well if you need things like that, obviously you'd have to code for it. But isn't flash filer some kind of file-based db? Bit strange to go from that to multiple dbs? Oh, and if you don't like Firebird, use PostgreSQL. Or TDBF. Or sqlite3. Or Oracle. Or MS SQL Server. Or another ODBC-accessible database. Or even mysql... No. 1 commit. Updates are sent as SQL statements. TDBF is on my radar for a long time. But I miss SQL there. The problem is that TDBF alike approach is not recommended by the ones using query components. Alltough TDBF works as database support is ment to be (at least in Delphi) ---------------------------------------------------------------------- teos · 2012-08-20 19:45 Quote from: tatamata on August 20, 2012, 09:38:34 pmQuote from: teonieuwlande on August 20, 2012, 05:07:15 pmI'm very interested in code from your attempts. Sorry, I don't have it anymore, it was long time ago. And in menatime, I rather made my own "database" - zmsql , as you already know http://sourceforge.net/projects/lazarus-ccr/files/zmsql/ http://wiki.lazarus.freepascal.org/ZMSQL Yes I know. Spent a few sundays on JanSQL myself. I have the components in my CodeTyphon IDE. And very interested in native Delphi client-server databases as you may have noticed ---------------------------------------------------------------------- BigChimp · 2012-08-21 15:37 Hi teoniewlande, Quote from: teonieuwlande on August 20, 2012, 09:43:38 pmI don't look at developers as standard users. Firebird Embedded you say does not run on Linux. The others need a DLL of some kind. And I suppose Firebird or another server running a database will provide security issues. No, I said it *does* run on Linux. Don't understand where you got that from. Agreed about security issues, but any kind of software provides security issues. Also your own. Furthermore, security is always a tradeoff. Finally, as embedded db dlls run in the application process, I don't see that much security issues for them. Quote from: teonieuwlande on August 20, 2012, 09:43:38 pmQuote from: teonieuwlande on August 07, 2012, 08:30:24 pmO and I forget: Firebird as mentioned before is running on Windows.. As mentioned before? By whom? Where? I don't get what you mean. Firebird can run on Windows, Linux, OSX, Solaris,.... I just read somewhere that Embedding Firebird has it's issues. And Embedded Firebird still requires a library/dll to run.. [/quote] I read and confirmed it works on x86 windows. And have tested it - on win32 and win64. But you're right if you're referring to this problem: x64 FPC has problems with embedded x64 Firebird (as well as probably all other embedded dlls) due to the way x64 FPC mishandles exceptions... in all dlls, so it's not just an embedde database problem. See e.g. this bug http://bugs.freepascal.org/view.php?id=21581 and http://bugs.freepascal.org/view.php?id=17360 Code to fix this has not yet been committed to trunk. Quote from: teonieuwlande on August 20, 2012, 09:43:38 pmQuoteI think that is because Firebird just works very well, can switch from embedded to client/server without recompile, has user management built in (IIRC since 2.5 quite complete using SQL statements). Ludob wrote a services API wrapper that lets you easily do backup/restore etc. This is available in recent FPC/Lazarus (also with examples). Why reinvent the wheel? It is not about inventing the weel, more about stopping with work arounds. Well, one man's workaround is another man's reliable, enterprise class database. But as I said, to each his own. There are people who are writing their own web servers in FPC. More power to them. Quote from: teonieuwlande on August 20, 2012, 09:43:38 pmQuoteClient/server with Firebird and other database servers? 2 phase commit and stuff? Well if you need things like that, obviously you'd have to code for it. But isn't flash filer some kind of file-based db? Bit strange to go from that to multiple dbs? Oh, and if you don't like Firebird, use PostgreSQL. Or TDBF. Or sqlite3. Or Oracle. Or MS SQL Server. Or another ODBC-accessible database. Or even mysql... No. 1 commit. Updates are sent as SQL statements. Sorry, I thought this: Quote from: teonieuwlandehow about a client-server with Firebird server with other databases on the same server meant you were talking about sending statements that make up one logical transaction to multiple databases. I must have misunderstood. Quote from: teonieuwlande on August 20, 2012, 09:43:38 pmTDBF is on my radar for a long time. But I miss SQL there.So... build in SQL support?! Tatamata did it with his zmsql... Quote from: teonieuwlande on August 20, 2012, 09:43:38 pmThe problem is that TDBF alike approach is not recommended by the ones using query components..Don't quite understand this one. You do know fpc/Lazarus sqldb already supports TDBF so you can have datagrids etc coupled to the dbf? Regards, BigChimp ---------------------------------------------------------------------- TurboRascal · 2012-08-21 15:47 Quote from: BigChimp on August 21, 2012, 05:37:26 pmQuote from: teonieuwlande on August 20, 2012, 09:43:38 pm Firebird Embedded you say does not run on Linux. No, I said it *does* run on Linux. Don't understand where you got that from. Wait a minute, the last I remember is that fb-embedded (at least properly) works only on windows... Has someone in the meantime made it work normally on linux too? ---------------------------------------------------------------------- teos · 2012-08-21 20:40 QuoteQuote from: BigChimp on August 21, 2012, 05:37:26 pmHi teoniewlande, Quote from: teonieuwlande on August 20, 2012, 09:43:38 pmI don't look at developers as standard users. Firebird Embedded you say does not run on Linux. The others need a DLL of some kind. And I suppose Firebird or another server running a database will provide security issues. No, I said it *does* run on Linux. Don't understand where you got that from. Agreed about security issues, but any kind of software provides security issues. Also your own. Furthermore, security is always a tradeoff. Finally, as embedded db dlls run in the application process, I don't see that much security issues for them. Quote from: teonieuwlande on August 20, 2012, 09:43:38 pmQuote from: teonieuwlande on August 07, 2012, 08:30:24 pmO and I forget: Firebird as mentioned before is running on Windows.. As mentioned before? By whom? Where? I don't get what you mean. Firebird can run on Windows, Linux, OSX, Solaris,.... I just read somewhere that Embedding Firebird has it's issues. And Embedded Firebird still requires a library/dll to run.. I read and confirmed it works on x86 windows. And have tested it - on win32 and win64. But you're right if you're referring to this problem: x64 FPC has problems with embedded x64 Firebird (as well as probably all other embedded dlls) due to the way x64 FPC mishandles exceptions... in all dlls, so it's not just an embedde database problem. See e.g. this bug http://bugs.freepascal.org/view.php?id=21581 and http://bugs.freepascal.org/view.php?id=17360 Code to fix this has not yet been committed to trunk. I think that the whole Freepascal community would benefit from a database of which client and sever run on all OS-es that Lazarus/Freepascal support. I'm not too well aware of how database approach works in Lazarus but I assume that the database components in Lazarus all need a dll to connect to the server. The approach that I talk about is native, so no external files required except maybe a database file. By security I mean a database server somewhere on which a database allready is installed and we need to add a database to that installation. That means sharing administrator passwords for maintenance.. I have chosen SQLite as backend because I expect to compile the database engine in my server. But at the moment I'm not sure if Lazarus supports this. And have no Linux box to test how to connect to sqllite on Linux. QuoteQuote from: teonieuwlande on August 20, 2012, 09:43:38 pmQuoteI think that is because Firebird just works very well, can switch from embedded to client/server without recompile, has user management built in (IIRC since 2.5 quite complete using SQL statements). Ludob wrote a services API wrapper that lets you easily do backup/restore etc. This is available in recent FPC/Lazarus (also with examples). Why reinvent the wheel? It is not about inventing the weel, more about stopping with work arounds. QuoteWell, one man's workaround is another man's reliable, enterprise class database. But as I said, to each his own. There are people who are writing their own web servers in FPC. More power to them. That is why I choose an existing database. Don't need all the work to handle data corruption etc. Quote from: teonieuwlande on August 20, 2012, 09:43:38 pmQuoteClient/server with Firebird and other database servers? 2 phase commit and stuff? Well if you need things like that, obviously you'd have to code for it. But isn't flash filer some kind of file-based db? Bit strange to go from that to multiple dbs? Oh, and if you don't like Firebird, use PostgreSQL. Or TDBF. Or sqlite3. Or Oracle. Or MS SQL Server. Or another ODBC-accessible database. Or even mysql... No. 1 commit. Updates are sent as SQL statements. Sorry, I thought this: Quote from: teonieuwlandehow about a client-server with Firebird server with other databases on the same server meant you were talking about sending statements that make up one logical transaction to multiple databases. I must have misunderstood. Maybe not. Transactional updates are quite possible. Quote Quote from: teonieuwlande on August 20, 2012, 09:43:38 pmTDBF is on my radar for a long time. But I miss SQL there.So... build in SQL support?! Tatamata did it with his zmsql... Maybe I will. Or test if TXQuery (formerly commercial, now open source) compiles on Lazarus. I think a database component without SQL will not be widely accepted, even if one can do perfectly without. Quote from: teonieuwlande on August 20, 2012, 09:43:38 pmThe problem is that TDBF alike approach is not recommended by the ones using query components..Don't quite understand this one. You do know fpc/Lazarus sqldb already supports TDBF so you can have datagrids etc coupled to the dbf? [/quote] I will look at SQLDB than. If I find a n-tier set of components or code that actually works and can be installed both on Lazarus and Delphi, I'm in for all solutions. Haven't found a project which actually compiles on Lazarus though. ---------------------------------------------------------------------- TurboRascal · 2012-08-21 21:45 To me it seems that the best candidate to create a small server is sqlite; it's already most crossplatform of all the stuff I know. Something on top of that which would provide network access together with some data brokering and user authentication stuff might be great... ---------------------------------------------------------------------- teos · 2012-08-21 22:03 Very off-topic but I found this post about compiling Firebird Embedded right into your exe. So maybe work on Linux after all.. http://mailer.lazarus.freepascal.org/index.php/topic,4159.msg19455.htm l#msg19455 ---------------------------------------------------------------------- TurboRascal · 2012-08-21 22:13 Quote from: teonieuwlande on August 22, 2012, 12:03:25 amVery off- topic but I found this post about compiling Firebird Embedded right into your exe. So maybe work on Linux after all.. http://mailer.lazarus.freepascal.org/index.php/topic,4159.msg19455.htm l#msg19455 Nobody mentioned fb-embedded works on linux in the thread you posted... ---------------------------------------------------------------------- BigChimp · 2012-08-22 07:51 @Arny: for what I gathered about Firebird embedded on various platforms: see this wiki article http://wiki.lazarus.freepascal.org/Firebird_embedded @Teo: it would be nice to see a native ObjectPascal database solution that supports SQL (locally or via the network), user management, backup/restore etc. ---------------------------------------------------------------------- TurboRascal · 2012-08-23 20:13 Quote from: BigChimp on August 22, 2012, 09:51:34 am@Arny: for what I gathered about Firebird embedded on various platforms: see this wiki article http://wiki.lazarus.freepascal.org/Firebird_embedded That's a great improvement, I'm glad to see it advanced so much! Quote from: BigChimp on August 22, 2012, 09:51:34 am@Teo: it would be nice to see a native ObjectPascal database solution that supports SQL (locally or via the network), user management, backup/restore etc. True true... Sometimes one can even get nostalgic for the (bad) old BDE ---------------------------------------------------------------------- geordie · 2015-09-23 13:47 I am looking for somebody to assist me in reading FlashFiler .dat files.  I have installed the NexusDB FlashFiler ODBC, but it asks for database and such, but I only have files.  Assistance would be appercisted. ---------------------------------------------------------------------- Graeme · 2015-09-26 12:14 Quote from: TurboRascal on August 21, 2012, 05:47:29 pmWait a minute, the last I remember is that fb-embedded (at least properly) works only on windows... Has someone in the meantime made it work normally on linux too? I know this is an old thread, but I thought I would give update information. Firebird Embedded works perfectly (and personally tested) on Windows, Linux, FreeBSD and OSX. Both 32-bit and 64-bit platforms. ---------------------------------------------------------------------- zeljko · 2015-09-26 12:34 Quote from: Graeme on September 26, 2015, 02:14:52 pmI know this is an old thread, but I thought I would give update information. Firebird Embedded works perfectly (and personally tested) on Windows, Linux, FreeBSD and OSX. Both 32-bit and 64-bit platforms. Any link or wiki about setting up embedded firebird on those platforms ? ---------------------------------------------------------------------- Graeme · 2015-09-28 10:27 Hi Zelko, For Windows I used some instructions on the net (I think the FPC Wiki). For Linux and FreeBSD I followed the Windows instructions, but adapted it for Linux - some minor trial and error and I got it working. For OSX, that was a huge pain! I really don't like "app bundles". I followed these instructions and added lots of my own fiddling around:   http://paulbeachsblog.blogspot.fr/2008/03/where-is-libfbclientdylib- on-macosx.html Regards,   G.