Saving form wipes all data! (OpenInsight Specific)
At 12 MAY 1998 07:01:45PM Henry Bolton wrote:
We've had a couple of clients reporting that occasionally, when they save a form, all data from the current record is lost. The ID remains in the system, but it's just associated with an empty record.
I've managed to replicate the problem with a very small example. I've got two forms, each has only one field from the same file. If I set up a record with data in one of the two fields, then open that record in the other form (so that no data is visible on the form) and save it, a null record is saved. The data from the other form is ignored.
Has anyone else encountered this problem? Is it a bug, or is it up to me to ensure there's data in the form before I save it?
At 13 MAY 1998 06:14AM Jeff Word wrote:
We had a similar situation where a save on a certain form would clear the record and yet leave the key. It ended up being a symbolic on the form that was setting @ID by accident.
At 13 MAY 1998 05:46PM Henry Bolton wrote:
So your record WAS being saved to another ID?
That's definitely not the case here. No new records are created, and no other existing ones are overwritten.
At 20 MAY 1998 09:26AM Aaron Kaplan wrote:
Can you give a better example on how to duplicate this?
At 20 MAY 1998 10:21AM Cameron Revelation wrote:
Henry,
It sounds like one of your events is overriding the system logic and allowing a save before the read occurs. Perhaps you have a LOSTFOCUS event on the key field(s) that has a "RETURN 0" instead of "RETURN 1".
For more information, see this response which deals with the same topic.
Cameron Purdy
Revelation Software
At 09 JUN 1998 11:48PM Michael Moran wrote:
I have noticed the same problem. If the datafields on the form contain no data and the user saves the record, a blank record gets written to the database.
Did you find a solution to the problem ?
If so please email me on:
At 10 JUN 1998 01:15AM Don Bakke wrote:
Did you find a solution to the problem ?
The quick and easy workaround is to put invisible controls on your form that are bound to these columns. That way the window will have that information "read" into the control and will save it accordingly.
At 10 JUN 1998 01:26AM Don Bakke wrote:
Hi Cameron,
The problems that Henry and Michael are bringing up are very real and very easy to duplicate. Try this:
1. Create a table called TEST
2. Create a key called ID, and three data input columns - F1 (for position 1), F2 (for position 2), and F3 (for position 3)
3. Create a new form called TEST and create editlines for ID, F1, and F2 (not F3)
4. Create a record in table TEST using the System Editor. Put any data in field position 3 but leave field positions 1 and 2 blank
5. Run the form TEST and enter the ID you just used
6. The form will indicate that this is not a new record, but everything should be blank because you are only displaying fields 1 and 2. So far so good
7. Save the row
8. Bring up the record in the System Editor and you will see that the data in field position 3 is now blank
Evidentally the READ logic requires that some data must populate a control or the entire record mapping goes awry. I would consider this a bug, even though this is probably a rare situation (for me at least).