Forum > Databases

pls advice for good style of dbedit within a form - many questions in one

(1/3) > >>

Nicole:
I have a rather slim DB_Modul, which holds database1, ... I just make you a screenshot.
There you see 6 components.

1)
The three at the left side are the base of all my work and work for a lot of of design-frames.

The three right ones, I am not sure (IBQuery_Allgemein and datasource_Allgemein):
Have I used them anywhere?

a)
How to find out best?
As I had troubles in the past in adding queries (you do not want to know details), I hesitate, just to delete them.
Sure, I can backup all before and hope, the problem will not turn out as such after 3 weeks of further work.

b)
The IBSQLMonitor: What does it do? Can I delete it or will then stop a working comfort function I am not aware of its benefits?


2)
The harder question:

I want to setup forms, which allow the user to edit tables. This query1 (not sure, if there is any use of it, as all my frames have their own queries) - this seems to shout "use me for this"!

If I use it, how to do best?
Shall I convert the db_modul into a form?
If yes, - how?

At the moment I tend to make an own unit / form for every table, which shall be edited. Never the less, there should be a base-form, which allows to select the table-to-edit. How to put it? In a new form? Put a class for this edit into my db_modul? Will this work at all?

The base of my ideas and plans  is this demo project:
.....try to link it.... I cannot find this attachment any more... it was from our genius here, whose name are only 2 letters, which I always forget. What I do not forget, is how helpful it was. And therefore I saved it. Must have been about beginning of December 2022.

I just post the project again.
(download recommended for all, who want to edit db-tables by a Lazarus-form, generates a DB!)

Thank you for all answers, hints and ideas of your own practice.



KodeZwerg:

--- Quote from: Nicole on January 26, 2023, 05:31:49 pm ---The three right ones, I am not sure (IBQuery_Allgemein and datasource_Allgemein):
Have I used them anywhere?
--- End quote ---
One moment, let me check all your project sources... dayum... you did not shared, so I can not answer that correctly. Maybe others have access to your project sources and willing to open and search or you start publishing them somewhere public.

dseligo:

--- Quote from: Nicole on January 26, 2023, 05:31:49 pm ---The three right ones, I am not sure (IBQuery_Allgemein and datasource_Allgemein):
Have I used them anywhere?

a)
How to find out best?

--- End quote ---

Don't just delete them.

To check, I'd use one of two methods (or both):
1. search all project files (*.pas *.pp *.lfm) for occurrence of these names. Search also in other file type if you use them (*.inc, *.lrf or *.frf). I usually use FreeCommander to perform search like this (https://freecommander.com/). If you find something then you use them.
2. change name of these components in DB_Modul.pas and DB_Modul.lfm (i.e. add '_test' to the end of name). Do that in external text editor with Lazarus closed. After change, do 'Clean up and Build' - if you get an error then you use them somewhere and you can just change name back.

Maybe Lazarus has something built-in to do this search, but I'm not aware of it (regular search doesn't search in *.lfm).
If you are not sure in yourself, maybe you should setup Lazarus with your project on another computer (or virtual one), copy your project's files there and use these methods there.

Nicole:
Thank you so much for the answer, this is a good idea.

Thank you for the link of Feecommander!

What I use for search tasks (this time I needed somebody who gives me the idea to do it as well) is:
Agent Ransack
https://www.mythicsoft.com/agentransack/


TRon:

--- Quote from: dseligo on January 27, 2023, 01:19:35 am ---I usually use FreeCommander to perform search like this (https://freecommander.com/). If you find something then you use them.

--- End quote ---
Are you familiar with doublecommander from our friend alexx2000  :)

Navigation

[0] Message Index

[#] Next page

Go to full version