Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 07, 2008 06:11 AM by arunvinoth
Dec 11, 2007 01:05 PM|LINK
I have a task, for example, to create a record for bill.
I have table which represents this bill entity (Bill_ID, Amount, CreationDate, ExposureDate, PaymentDate)
In table definition date fields allow null.
I would like to create bill, which means insert record: (new_bill_id, 1000, 2007.12.11, null, null)
But it couses exception. Smth like: System.Data.SqlTypes.SqlTypeException, date should be not null.
How could I do it?
Dec 11, 2007 01:25 PM|LINK
dive some code... are you using dataset or something??
Dec 11, 2007 01:36 PM|LINK
Yes I use Dataset
In properties of the field dafault value is dbnull and behavior on Null is throw exception.
Dec 11, 2007 01:43 PM|LINK
Please check sql table column constraints it may be not null column.
can you post your sample code
Dec 11, 2007 01:45 PM|LINK
set allow null for this column in dataset. and try use this...
Jan 07, 2008 06:11 AM|LINK
u can send DBNull.Value from front end
or sending empty string & checking in stored procedure for empty string to send null value from SP to table.