How about omitting the column from your insert statement, i.e. instead of:

   insert into table (myKey, myColWithDefault) values (123, null)

do:

   insert into table (myKey) values (123)

If you are using CMP you will need to check with BEA whether this is possible.

Ashish Ravi wrote:
>
> Hi,
>  If i have a set a default value for a not-null column in my table and when
> i insert a record(while sending a null value for the above-mentioned
> column), i get a "java.sql.SQLException : Cannot insert the value NULL into
> column" error.
>  How do i let the insertion take the default value from the dB? i'm using
> Weblogic 5.1 with SQL Server.
>
> Ashish
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

--
________________________________________________________________________________

Evan Ireland              Sybase EAServer Engineering        [EMAIL PROTECTED]
                            Wellington, New Zealand               +64 4 934-5856

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to