Re: Q: DELETE_RECORD for empty item
Date: 13 Apr 2004 10:27:51 -0800
Message-ID: <407c2317_at_news.victoria.tc.ca>
In article <4078847a_at_news.victoria.tc.ca> I wrote:
: The following problem occurs.
: The user enters a value in one field - a row is implicitly inserted.
: The user does other stuff.
: The user returns to that field and uses the backspace or delete key and
: removes all the characters.
: The column now has a null value, which isn't allowed.
: To continue, the underlying row must be deleted.
As always, the real problem was the mismatch between my head and the code.
I removed all constraints in the database and the problem still occurred, which made me realize I was misunderstanding the whole thing.
The individual fields in the form had the constraints! I don't know why this obvious thing should have escaped me (duh). The database constraints are perhaps used by the data wizard to help set up a block, but otherwise appear to play no role until the data is committed later to the database. (The form uses deferred checking so perhaps this is not always true.)
Anyway, I set the involved item fields to required:no and check all the datablocks myself later, just before the form commit, and delete any that are null.
(And thanks for another response that somehow turned up as a different thread in my reader.) Received on Tue Apr 13 2004 - 20:27:51 CEST