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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top