File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Deleting single/multiple rows from databse using checkbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Deleting single/multiple rows from databse using checkbox" Watch "Deleting single/multiple rows from databse using checkbox" New topic
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: 2516
    
  10

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 and ITIL foundation
youtube channel
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deleting single/multiple rows from databse using checkbox