If you are doing SQL INSERT and do not want to supply a value to a column
that has a set default value, then you cannot have a '?' placeholder for
that column, nor supply a 'null' as the bind variable.
Under BMP, you can modify your sql statement to exclude this column.
Under CMP, I'm not aware of any way of doing this, since the container
constructs the prepared stmt. If there is a solution, it is most likely
vendor-specific and your best bet is to consult your server's support
network.
Gene
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
To: [EMAIL PROTECTED]
Sent: 2/28/01 7:41 PM
Subject: Default value(s) in dB column
Importance: High
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".
===========================================================================
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".