A better date/time value into a database?

  • Thread starter Thread starter Schorschi
  • Start date Start date
S

Schorschi

Is there a better way to get the date/time from VB .NET into an Access
MDB than
"#" & Now & "#"?

I have a standard date/time field in a table in a MDB file. And the
'#' trick works, but seems rather hoaky.
 
Schorschi said:
Is there a better way to get the date/time from VB .NET into an
Access MDB than
"#" & Now & "#"?

I have a standard date/time field in a table in a MDB file. And
the '#' trick works, but seems rather hoaky.

Use Parameters with the Command object. See documentation of OleDbParameter
class and the OleDBCommand.Parameters property and the topics that give
examples of how to use them.
 
Back
Top