Click here to Skip to main content
15,895,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I tried to insert data into SQL DB (database. Table doesn't contain any data, It;s a fresh insert. there is a auto generate column in my table. based on that while inserting I use auto generate column value to add +1 to another column while inserting. But I am getting error in UI :
"The null value cannot be assigned to a member with type System.Decimal which is a non-nullable value type."
Posted

You can not use auto generate column value before inserting complete(Required) row data.

auto generate column value is generated, when there is an insert query executes successfully at database.

thats why it is supplying Null value to your surly required decimal column.

check it and let me know... :)
 
Share this answer
 
v2
Comments
Member 9861478 12-Jul-13 5:54am    
Thank you for your solution But I found a solution as per my requirement.
nice

wish you good luck
happy coding :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900