Suraj
unread,Mar 8, 2013, 7:10:17 AM3/8/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi frens,
I have created a table in SQL server with 10 columns with char
datatype with default value ' ' (empty).
For the table, i insert values into 6 columns using the below code in
c# using linq
tblRecordType1 objtblRecordType1 = new tblRecordType1();
objtblRecordType1.AccountNumber = 1233;
objtblRecordType1.AccountNumber2 = 1233;
objtblRecordType1.AccountNumber3 = 1233;
objtblRecordType1.AccountNumber4 = 1233;
objReadTextFileDataContext.tblRecordType1s.InsertOnSubmit(objtblRecordType1);
objReadTextFileDataContext.SubmitChanges();
The above code will insert records into 4 columns only.
since, I had set default value to ' ' for all columns, I expected the
remaining 6 columns to have ' '. But, here they have null.
Can you please have a look and advice.
Regards,
Suraj