home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.ingres
- Path: sparky!uunet!tpghq!sfc
- From: sfc@tpghq.com (Steve Caswell)
- Subject: Re: ABF question
- Message-ID: <1993Jan8.143019.8886@tpghq.com>
- Organization: Palmer & Associates, Inc., Norcross, GA
- References: <1993Jan7.170744.71@ittpub.nl>
- Date: Fri, 8 Jan 1993 14:30:19 GMT
- Lines: 52
-
- In article <1993Jan7.170744.71@ittpub.nl> hans@ittpub.nl writes:
- >I am using ABF to maintain a tabel of items. The user should be able to add
- >and delete these items, and modify most of the information associated with
- >the item.
- >
- >Each items has a key value. I want to prevent the user from modifying this
- >key value. Defining the column DISPLAYONLY is no good, for the user has to be
- >able to specify the value when adding new items. By the time I catch the error
- >I cannot change it back, as the original value is lost.
- >
- >Is there any way I can:
- >
- >a. Allow creation and deletion of a column in a table field, without also
- > allowing modification?
- >b. Have access to the old value, so I can change it back?
-
- You can only get access to the old value if you store that value when loading
- the tablefield. You can accomplish this by adding a hidden column to the
- tablefield in the initialize section of the abf source:
-
- initialize
- (table.hidden_column = datatype
- etc.
- )
-
- and then load that column when you load the tablefield. For example,
- table = select key_column
- ,key_column as table.hidden_column
- etc.
-
- >
- >Or is there any other way of doing what I want?
-
- One solution we employ for this kind of problem is to leave the column in
- displayonly mode and keep the tablefield in update mode. This allows only
- updating of rows loaded by the application. To allow entry of new rows, we
- use an Add menuitem which displays a pop-up form to allow entry of new data
- values, then use insertrow or loadtable to add the new row to the tablefield
- from within the code.
-
- >
- >Thanks in advance.
- >
- >Hans Wieldraaijer, ITT Publitec, Amsterdam, Netherlands.
- >E-mail: hans@ittpub.nl
-
-
- --
-
- Steve Caswell | (404) 448-7727 | "The opinions expressed are my
- Principal Consultant | sfc@tpghq.com | own. They may not be perfect,
- The Palmer Group | uunet!tpghq!sfc | but they're all I've got."
-