I am trying to write the current date into a database table. I have set the field of the table as 'date'. I am writing
DateTime.Now.Date.ToString as a parameter to the insert/update query. So, my code is something like:
cmd.CommandText = "update tab set dt = @d where id=1"
cmd.Parameters.add("@d",DateTime.Now.Date.ToString)
This doesnt seem to be updating values in the database. Is something amiss here?