Forum > Databases

Form creator for editing a table?

(1/2) > >>

Is there a creator for database editing form for Lzarsus?
I want to automatically create a form with controls: label + dbedit or edit for all fields in a table.

Not sure, what you want.
Please search e.g. for


I think you want:

Create a form in IDE but the TLabel and TDBEdit are created dynamically by Pascal logic (instead of using IDE to put these components in the form) based on the columns in a databae table?

If you want to do this, you need to know:
1. How to create components using the Pascal language (e.g. starts with TLabel.Create(self)).
2. Loop the TFields in an active TSqlQuery (or TDataset) to create TDBEdit.
3. Assuming your field display name is meaningful, you can use Field.DisplayName for the TLabel.Caption.

I don't not if there is any existing library with this function.

You also might consider creating once your TForm as a TFrame and reuse it as often you like to.


I have created a template for my own usage that create a Form DB style address book (sqlite)

You can try it out and modify it for your own use.

Just put the directory CreateDB in your template directory.



[0] Message Index

[#] Next page

Go to full version