asp.net - SQLServer INSERT getdate() function using parameters -



asp.net - SQLServer INSERT getdate() function using parameters -

what preferred method of adding current date/time sql server table insert command , executenonquery? i'm expecting ...

cmd.parameters.add("@thedate", sqldbtype.varchar, 20) cmd.parameters("@thedate").value = "getdate()"

how about...

cmd.parameters.add("@thedate", sqldbtype.datetime) cmd.parameters("@thedate").value = datetime.now

asp.net sql-server vb.net sqlparameters executenonquery

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -