I created mvc 4 application that can upload data into database using sql bulk copy upload method.
Once I select excel file, it can upload data into the system.
this is working fine, now I want to add default value if excel field is null
this is how it extract column values of excels
"s1.Gender, " +
"s1.Country_of_Birth, " +
"s1.Date_of_Birth, " +
I want to add default value from code level , I already handle this using database level.
for example to add default value for "date of birth" I added following constraint
ALTER TABLE [dbo].[tbl_HEI_student] ADD CONSTRAINT [DF_tbl_HEI_student_Date_of_Birth] DEFAULT (getdate()) FOR [Date_of_Birth]
But when I upload excel file into db ,SQL bulk copy upload method is ignoring adding that default value database .
How can I add default value from controller method