Hi there I have a SQL Datetime field in sql 2000. I have a stored proc called addPresentation. From my .Net code I add a sqlparameter as:-
new SqlParameter("Date", SqlDbType.DateTime).Value=DateTime.now
When I call the stored proc from code and observe sql profiler it is attempting to perform the insert as :-
exec addPresentation @Name='Gary Thorpe',@Date=' '2008-11-28 00:00:00:000' ',@Duration=60
As you can see the issue is the 2 single quotes each side of the date to be inserted. But how are these coming about? Have been wracking my brain for ages on this one. Any helpers?