Yuliya
Active member
- Joined
- Nov 9, 2007
- Messages
- 34
- Programming Experience
- Beginner
I am working on a Windows form application where a user enters data which is saved in a database. There are several fields in a DataGridView that the user needs to fill out. I need to set a default value for some of the fields, so if the user doesn't specify the value, it would be set to the default.
So when I specified a table in the database, I put a default value in some of the columns (through Visual Studio db editor). I also set up those columns to not allow null values. But when I run my program, if I don't enter a value in those columns, I get an exception that null is not allowed, instead of setting it to the default value.
What am I doing wrong?
Thank you very much!
So when I specified a table in the database, I put a default value in some of the columns (through Visual Studio db editor). I also set up those columns to not allow null values. But when I run my program, if I don't enter a value in those columns, I get an exception that null is not allowed, instead of setting it to the default value.
What am I doing wrong?
Thank you very much!