Hi guys,
Im an asp.net c# newbie, and this is my first post, so i hope im submitting it in the right place (not sure whther it should be here or SQL. Anyway, hopefully this will be an easy one for someone.
Im trying to get a date into an SQL smalldatetime column using:
AddArt.InsertParameters.Add("dateinserted", DateTime.Now.ToString());
but all all i keep getting is:
Arithmetic overflow error converting expression to data type smalldatetime. The statement has been terminated.
i also tried this:
AddArt.InsertParameters.Add("dateinserted", DateTime.Now.ToShortDateString());
Thanks in advance for any suggestions.
Ben
Im an asp.net c# newbie, and this is my first post, so i hope im submitting it in the right place (not sure whther it should be here or SQL. Anyway, hopefully this will be an easy one for someone.
Im trying to get a date into an SQL smalldatetime column using:
AddArt.InsertParameters.Add("dateinserted", DateTime.Now.ToString());
but all all i keep getting is:
Arithmetic overflow error converting expression to data type smalldatetime. The statement has been terminated.
i also tried this:
AddArt.InsertParameters.Add("dateinserted", DateTime.Now.ToShortDateString());
Thanks in advance for any suggestions.
Ben