| Author |
Deleting single/multiple rows from databse using checkbox
|
Poonam Dhatavkar
Greenhorn
Joined: Jan 11, 2013
Posts: 19
|
|
i want to delete single/multiple rows from database table on clicking the checkbox, in addition it should first show all the rows and columns.
A part of code i am using is:
Problem with the code is, when i remove 'value="<%= rs.getString("bookid")' in input type, only then it shows whole data (select*from book)
and it deletes a row, bt as data is not shown, we cant predict which row is about to delete.
Also in case of deletion of multiple rows,
i am getting syntax error as==> Syntax error (missing operator) in query expression 'bookid IN()'.
Can somebody help me ??
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
Looking at the error message, it seems your selected variable is empty.
It is easier if you give us the complete error, exactly as it is logged in the program.
|
OCUP UML fundamental
ITIL foundation
|
 |
Poonam Dhatavkar
Greenhorn
Joined: Jan 11, 2013
Posts: 19
|
|
|
Message i gt is "No data found"
|
 |
Poonam Dhatavkar
Greenhorn
Joined: Jan 11, 2013
Posts: 19
|
|
i did some changes in code and database, and now i can delete single row.. bt there is still problem with multiple rows selection and deletion. Is there something wrong with the code ?? like in loops ?
i am not getting any kind of error message.
|
 |
Poonam Dhatavkar
Greenhorn
Joined: Jan 11, 2013
Posts: 19
|
|
i got the solution.
|
 |
 |
|
|
subject: Deleting single/multiple rows from databse using checkbox
|
|
|