Forum > Databases


(1/3) > >>

Hi All,
   I'm new to Lazarus coming from Delphi 7 long time ago. I have designed a pascal system since the early nineties, most of the development I did was when I own my own company designing software for the personel placement industry, i.e. head-hunters & temporary/contractor placement firms.
   In retirement I started a hobby in photography.  A friend of mine was talking about he wished he had a small software system to manage his photography business.  So, here I am having fun designing a small system with Lazarus/FP.
   The system is similar to Delphi so easy to get going.  My problem is that I thought I'd use the TDbf component for the data. I found a neat little app called My DBF Studio and designed a Database/Table with 3 indexes defined.
   Anyway, making a long story short. Placed the TDbf component on my form. Then made it active so I could assign the Database Table defs. Defined the FilePath, Table Name, easy enough. But, Lazarus doesn't recognize the table or anything. I can't an IndexFieldName, MasterSource, MasterFields, FieldDefs, IndexName. Version is 7.0, TableLevel 4. I think it defaulted to these values for TableLevel and Version.
   Anyone have experience with any of this and could advise what I'm doing wrong or left out?
Tks & advise, Donald aka 1HuntnMan

At least the version of MyDBFStudio which I maintain comes with two sample dbf files. Can you open these in your application?

You can find a tutorial how to use the TDbf component at It also contains a section how to create a dbf database by code, independent of MyDBFStudio.

I'll try opening your samples. If that works, then I'll get back to you and will be more confused because I created my table with MyDBFStudio. I have the Lazaraus_Tdbf_Tutorial link saved at the top of my browser and could create the database via code but thought it would be easier to use a tool such as your MyDBFStudio. I had also downloaded another app called DBF Manager which isn't as intuitive as your app.  I can open the .DBF I created with MyDBFStudio. and DBF Manager also sees the indexes also created with your app.
If I can't figure this out then I'm going to either create the table via code in my app or move to SQLite.
Tks for your reply/advice,

You were saying that you created indexes for the dbf file. I am aware that the TDbf which comes with FPC has issues with indexes, and this is the reason why I used in MyDBFStudio the original TDbf from which the FPC version was forked. If I can confirm your issues I could try to figure out a way how to load the dbf in Lazarus.

Could you send me the table that you created with MyDBFStudio? If you don't want to publish it put it on some cloud server and send me the link via PM.

why TDBF could be better to use sqlite....think is local database


[0] Message Index

[#] Next page

Go to full version