Re: Check box in Oracle Forms

From: Jeff <jeff_at_work.com>
Date: Mon, 15 Sep 2003 13:01:14 GMT
Message-ID: <bk4d6s$rhe$1_at_cronkite.cc.uga.edu>


Doesn't work that way. Forms is pretty much ignorant of the integrity/check constraints set on the database (unless you tell it). The default values to which you are referring are set AT the database level, which are not set until the commit_form, when the ACTUAL database inserts usually happen. If you didn't set the value of x by the time of the commit_form, then your newly inserted row's x would indeed be defaulted to 'N'.

In article <9da6aa86.0309121032.2d8be93f_at_posting.google.com>, fororacleonly_at_yahoo.com (fororacleonly) wrote:
>create table t ( x varchar2(1) not null default 'N')
>I have a check constraint on column x restricting values to ('Y','N')
>
>On my form I have have a chek box for the above column. I havent set
>the initial value for the check box. The checked value is 'Y' and the
>unchecked value is 'N'.
>
>When I'm doing a insert from my form, I'm getting the error message
>stating cannot insert null into X.
>
>According to me, the default value should apply and the record should
>save.
>
>I'm I missing something, like setting a check box property etc.
>
>Please give your opinion.
Received on Mon Sep 15 2003 - 15:01:14 CEST

Original text of this message