Recent

Author Topic: pls advice for good style of dbedit within a form - many questions in one  (Read 1238 times)

Nicole

  • Hero Member
  • *****
  • Posts: 744
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

  • Hero Member
  • *****
  • Posts: 1240
  • Fifty shades of code.
    • Delphi & FreePascal
The three right ones, I am not sure (IBQuery_Allgemein and datasource_Allgemein):
Have I used them anywhere?
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.
« Last Edit: Tomorrow at 31:76:97 by KodeZwerg »

dseligo

  • Hero Member
  • *****
  • Posts: 961
The three right ones, I am not sure (IBQuery_Allgemein and datasource_Allgemein):
Have I used them anywhere?

a)
How to find out best?

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

  • Hero Member
  • *****
  • Posts: 744
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/


« Last Edit: January 27, 2023, 10:19:09 am by Nicole »

TRon

  • Hero Member
  • *****
  • Posts: 834
I usually use FreeCommander to perform search like this (https://freecommander.com/). If you find something then you use them.
Are you familiar with doublecommander from our friend alexx2000  :)

dseligo

  • Hero Member
  • *****
  • Posts: 961
I usually use FreeCommander to perform search like this (https://freecommander.com/). If you find something then you use them.
Are you familiar with doublecommander from our friend alexx2000  :)

I was aware of it, but I didn't used it yet.
I installed it and it seems to start noticeably faster than FreeCommander, I like that.

TBH, I only use FreeCommander to search files and if DoubleCommander does the job fine (and from preliminary testing it does) I'll probably start using DoubleCommander.

Nicole

  • Hero Member
  • *****
  • Posts: 744
Is one of those able to do ftp as well?
I have to give up my ftp-client recently, because my provider said, "we did away with this old crap".

TRon

  • Hero Member
  • *****
  • Posts: 834
Is one of those able to do ftp as well?
I have to give up my ftp-client recently, because my provider said, "we did away with this old crap".
I can only tell for double commander (see screenshot).

Also for dseligo:
I prefer dbl-cmd above others simply because I can adjust its source-code :).
« Last Edit: January 27, 2023, 06:30:38 pm by TRon »

Nicole

  • Hero Member
  • *****
  • Posts: 744
Thank you for the screenshot.
Unfortunately I cannot find "yes" or "no" to the question, if it does ftp.
Does it? - Thx.

TRon

  • Hero Member
  • *****
  • Posts: 834
Thank you for the screenshot.
Unfortunately I cannot find "yes" or "no" to the question, if it does ftp.
Does it? - Thx.
The screenshot is a picture of double-commander viewing the contents of the freepascal ftp server  ;)

Thaddy

  • Hero Member
  • *****
  • Posts: 12950
Re: pls advice for good style of dbedit within a form - many questions in one
« Reply #10 on: January 27, 2023, 09:16:31 pm »
<Sigh>
The even now definitive book about user interface design is Alan Moore's "About Face: The Essentials of Interaction Design".

Every serious programmer should have read it. Especially screendrawer types because the whole paradigm is designed by him. (he designed VB, Excell, Word etc user interfaces)

Now it is 4th edition, I own 2th. I am old, but at least this month able to play "when I'm 64" with grace...
<just an on-topic thought>

p.s: well three weeks..
« Last Edit: January 27, 2023, 09:32:23 pm by Thaddy »
In memory of Gordon Moore  (January 3, 1929 – March 24, 2023) Just double the heaven every two years from now.

 

TinyPortal © 2005-2018