Cannot insert the value null into column 'COLUMN1',table'DB1.dbo.table1';Column does not allow nulls. Insert fails.the statement has been terminated.
This always shows if edit or save another data onto excel columns.
using (SqlCommand cmd = new SqlCommand("Insert into dbo.Table1 Select * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database="+ filepath + ";HDR=YES','SELECT * FROM [Sheet1$]')", conn))
Is there a best way to handle this....