Reputation: 1832
I'm using MS Access mdb as a database for my C# application. I need my application to update a row every few seconds and I want it to save the database's current time into the lastUpdate field. I don't want to start writing the code before I'm sure which method I should use.
So, in the UPDATE SET command, should I use NOW(), GETDATE(), CURRENT_DATE(), CURTIME() or something else?
Example (correct?):
UPDATE UsersSignedIn SET lastUpdate = NOW() WHERE appUserName = ?
Thanks in advance for your advice!
Upvotes: 0
Views: 861
Reputation: 72676
Yes in MS-Access you have to use NOW()
function because there isn't GETDATE()
.
Upvotes: 3