You can bind a DateTime, but not a SqlDateTime, so be careful how you use
each. The SqlDateTime is useful for handing to a stored procedure or placing
in SQL Server via parameters, so it is useful to use. SqlDateTime has the
following constructor:
SqlDateTime(DateTime)
This allows you to use the DateTime in your code and cast into the proper
SQL type to add to a parameter as a value. Very nifty.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Niclas" wrote:
Hi,
I need to insert a time value from my ASP .Net web application in the format
Minute:Second:Millisecond to a SQL column typed with datetime.
The approach i was thinking of was to instantiate a
System.Data.SqlTypes.SQLDattime with the assigned parameters to form the
time value and pass to the database.
Can someone please advise what best practice is when storing time values in
SQL 2000, and if there is a better approach than the one i have chosen.
Niclas