Forms 6.0 and interaction with table/column with default value
Date: Mon, 11 Dec 2000 19:45:25 -0800
Message-ID: <t3b7ntlp2nhr46_at_corp.supernews.com>
[Quoted] [Quoted] I have a table in the database that has a default value on a particular column:
[Quoted] [Quoted] Example (not my actual table but I'm keeping the example simple):
CREATE TABLE MY_TABLE
(MY_DATA VARCHAR2(50) NOT NULL,
INSERT_DT_TIME DATE DEFAULT SYSDATE NOT NULL);
If I insert something into the table outside of Forms (like in SQL*Plus), this
works fine:
INSERT INTO MY_TABLE(MY_DATA)
VALUES('STUFF');
[Quoted] [Quoted] It populates INSERT_DT_TIME for me with no problem even though I didn't specify
it.
[Quoted] However, I now have a form where MY_TABLE is the base table for a block. I [Quoted] [Quoted] give the user the items MY_DATA and INSERT_DT_TIME, but I leave INSERT_DT_TIME [Quoted] [Quoted] as optional in the form since I'm expecting the default at the table level to [Quoted] populate it if the user doesn't.
[Quoted] When I commit a record in the form with a null INSERT_DT_TIME, I get an ORA-1400 error on the INSERT_DT_TIME column. Why is this? Shouldn't the [Quoted] table's default value of SYSDATE populate that column for me when I don't do it [Quoted] ahead of time?
Thanks,
Matt Received on Tue Dec 12 2000 - 04:45:25 CET