Forum > Databases
[SOLVED] Tdbf FPC components vs Lazarus DataAcess TDbf???
1HuntnMan:
When first I installed Lazarus a few months ago and just starting programming after a long, long time ago with Delphi 7, I started creating my first app using Dbf tables/indexes included with Lazarus. The different components I guess you would call them at the top of the work area or IDE you can click on the Data Access and click on the DBF component and place it on a form. And then use other Data Controls, etc.
I understand this has bugs or does it. Here's a comment awhile back from IRET, "DBase is really outdated and the TDbf FPC components have major bugs concerning index files. If you really want to use dbase files you should use the original TDbf from sourceforge."
So, what is IRET referring to, the DBF component that comes with Lazarus in the Data Access?
The original TDbf from SourceForge is different, correct?
1HuntnMan:
Should I install this from SourceForge? https://sourceforge.net/projects/dzpackageinst/ (titled:
dzpackageinst -> a package installer for Delphi 6 to 10.3)
OR this: [ Titled: https://sourceforge.net/projects/tdbf/ -> tDBF component for Delphi and BCB
TDBF is a native dBASE III+, dBase IV and dBase 2k data access component for Delphi, BCB, Kylix, FreePascal. It allows you to create very compact database programs which don't need any special installer programs. The DB engine code is compiled right into your executable. ]
wp:
You should use the "Download" button in https://sourceforge.net/projects/tdbf/ to get a zip of the dbf component, unzip it and install the .lpk files in the packages/Lazarus folder of the unzipped package.
Do not use any third-party installers.
BUT: I tried it, and was not able to install it because the lpk files are broken, they do not contain the correct path to the units. But even after fixing this in my local copy the IDE could not be rebuilt. This is really not normal. I try to report a bug on sourceforge.
If you urgently need this package I think you can only use it at runtime (this is what is done in MyDBFStudio), i.e. you must create the TDbf component and set its properties in code - not a big deal, but many users want to have it on the component palette. Tell me if you want to do it this way, then I'll tell you how to fix the runtime package.
1HuntnMan:
Okay WP, but am I correct that when I installed Lazarus back in Nov. 2023, I've since kept up with the upgrades and have the latest version installed, the components in the IDE under the Data Access: TDbf and TDataSource are an issue????
If so, then eventually may want to install the SourceForge TDbf version. I'm just testing and relearning how to design. No issues except that the second system I'm designing for a fellow photographer is a Photographer's Mgt. System. TRon educated me on the Jvcl components which make it easy to design index selection with a TComboBox but context searching via TJvDBSearchEdit. This works nifty in the Clients and Contacts forms but I mistyped and mixed up the Index Name with the field name designing the Appointments form. What happened in the TDbf index file (.mdx) indexes were just appearing on the fly which I didn't create. I figured out my typos but my first thought was that there was a bug in the TDbf/mdx or something. So, started searching if that was so. Anyway, not a big deal. My first little project was a super-duper Contacts Mgt. system I designed with Laz just to get back into the groove after not programming in a long time. I'm retired and doing this because I love it. Anyway a bunch of my friends that are photographer's are really liking the Contacts app because Winders doesn't come with a Contacts app like Apple iPhones, iPads, etc. Now, they want me to design a Photographer's Mgt. System so I'm thinking even though this isn't a multi-user system or maybe at the most 4-5 users, to ditch dbase and use SQLite.
Back in the olden days when I migrated from Turbo Pascal and started programming with Delphi 5 then 7 I used Paradox database. (*.DB files) Paradox doesn't seem to be supported anymore so relearning with dbase.
wp:
The TDbf which is installed in Lazarus by default on the "Data Access" palette, is good for most of the work. However, when I took over MyDbfStudio for some renovation, I noticed that there is an issue with indexes, I cannot remember any details. I took the easy way and switched over to the TDbf on Sourceforge which resolved the issue, similarly as I had read from others here.
I am sure that the index issues of the TDbf version can be fixed. What is missing is a clear bug report describing the issue and the way how to reproduce it.
The other version of TDbf on Sourceforge currently is broken and cannot be installed. I filed a bug report yesterday, maybe it gets fixed. Nevertheless, it can be used in runtime code (like in MyDbfStudio), however, after a tiny modification.
As for Paradox files: You can read them by means of the TParadoxDataset package which can be installed from Online-Package-Manager. You cannot use it to write to Paradox files, though. There is another paradox package even in the Lazarus source tree installation which can read and write. However, it needs external dlls, is Windows-only and usable only for 32-bit (IIRC).
Navigation
[0] Message Index
[#] Next page