Home > Back-end >  How to use the button to add the date
How to use the button to add the date

Time:10-21

I'm doing a library system, wants to return the book, return the book button, in search of records, add book time... The code for how to write?
As shown in figure:
Search is ready, is also a book that button code...
Online, etc... Help!

CodePudding user response:


CodePudding user response:

Your database "due date" this field is what kind of?

CodePudding user response:

datetime

CodePudding user response:

If the grid binding adoquery,
 adoquery - & gt; Edit (); 
Adoquery - & gt; FieldByName (" due date ") - & gt; Value=(https://bbs.csdn.net/topics/Now);
Adoquery - & gt; Post ();

CodePudding user response:

Suppose nID is known borrowing number, the code is probably like this:
 String strSQL=String () sprintf (
"Update library return the book set date='% s' where borrowing number=% d",
Now (). DateString (), nID);

CodePudding user response:

Done... Thank you for your
  • Related