Here's my code:
uprs.moveToInsertRow();
uprs.updateString("Sender", myName);
uprs.updateString("Receiver", withWho);
uprs.updateString("Message", myMessage);
//uprs.updateString("Time",****);
uprs.insertRow();
Things go perfectly when adding the non-time data into the database.
But I am struggling how to add the current date and time into the database.(Ms SQL 2008)
Is there any expert can tell me how to organize the code about getting the current time and date and insert them into the db?
The data type of Time in my db is "datetime".
Thank you!