Subject | Re: Inserting New Rows - Long-winded? |
---|---|
Author | robert_nixon@talk21.com |
Post date | 2013-10-20T19:39:27Z |
Thanks for your quick reply, Helen. It seems a bit "wrong" to have a method that appears to ignore the SQL statement in the query, which is perhaps why I was looking in the wrong places, but it's very convenient.
I was interested to see your commendation for using a data module. I tried this when I was using Paradox (yes, quite a while ago) and could not make it work without re-declaring everything, and I've seen someone do that with a proper RDBMS too. Is there a text available on how to make it work properly?
I was interested to see your commendation for using a data module. I tried this when I was using Paradox (yes, quite a while ago) and could not make it work without re-declaring everything, and I've seen someone do that with a proper RDBMS too. Is there a text available on how to make it work properly?
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 08:46 p.m. 16/10/2013, robert_nixon@... wrote:
> >The "standard" SQL form for inserting rows involves writing all the column names and all the field contents or references, with the possibility of omitting the column names.
> >Several forms in my current app have a dozen or more fields, such as name street city postcode phone etc, that are displayed to the user for information and are also available for editing. A method of adding new records is needed, and the obvious way is using the same form. However I cannot find, after 2 days of searching help files and forums, a way of using the TIB_Edit fields already linked to a TIB_query to insert new rows. I am obviously keen to avoid the long-winded "standard" SQL method, given I have several forms to do. Could someone please explain how it can be done?
>
> In IBO, the dataset drives the controls, not the other way round. So, if you put the dataset into Insert mode, all the linked controls will be in Insert mode too. You can make it happen by introducing an "Add" or "New" button that toggles between inserting and editing. You can get things to happen magically by using the TIB_*Bar controls (TIB_DatasetBar and its relllies). The user also gets a background colour cue for the mode, basically pink for deleting, blue for inserting and green for editing, which you can customise. There's lots more to know about the bar controls.
>
> If you put your datasets, datasources and other non-visual components into a separate datamodule unit, multiple forms can be connected to the same datasets with ease. This will also please the Gods of Design.
>
> HTH
> Helen
>