I read/update data from MS Access using C#. My code is:
public static void UpdateLastLogin(int userid, DateTime logintime) ///logintime = DateTime.Now {
Should it not be
"UPDATE Customers SET LastLogin='@LastLogin'"
And @LastLogin should be
logintime.ToString("yyyy-MM-dd hh:mm:ss")
edit Could you not just inline the whole thing?
"UPDATE Customers SET LastLogin='" + logintime.ToString("yyyy-MM-dd hh:mm:ss") + "'"