Home > database >  Pb do books management system management system, library return the book
Pb do books management system management system, library return the book

Time:10-02

Do the books management system management system
Table state number bno and borrowed id used to store books
User input bno and id, some books can
Id record of 0 books in the library, library id after deposited in the book the id of the

Implementation, to search books list number, but there is a problem, search after the number, how to modify the id data
Don't know how to point to the line
Here is my code:
String ls_bno ls_id//, ls_ps1, ls_ps2
Ls_bno=trim (sle_bno. Text)
Ls_id=trim (sle_id. Text)
The select bno, id into: ls_ps1, : ls_ps2
From the state
Where bno=: ls_bno and id=: ls_id;

If the sqlca. Sqlcode=100 then
MessageBox (' mistakes', 'user error, please input again! ')
Return
End the if

If sle_bno. Text=ls_bno then

Do not know how to write the
Please guide me ~
Thank you for the

CodePudding user response:

Before you can write also has a problem!
It can't judge! You have to go to the user table to find
The select bno, id into: ls_ps1, : ls_ps2
From the state
Where bno=: ls_bno and id=: ls_id;

If the sqlca. Sqlcode=100 then
MessageBox (' mistakes', 'user error, please input again! ')
Return
End the if


Modify the


The update id=: ls_id
From the state where bno=: ls_lbn;

CodePudding user response:

Feel thinking there is a problem, when you enter the user number and book number, why to query the number two? If the judge to judge a book did lend, if does not lend to lend,
  • Related