• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Deleting single/multiple rows from databse using checkbox

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ??
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Poonam Dhatavkar
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Message i gt is "No data found"
 
Poonam Dhatavkar
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i got the solution.
 
reply
    Bookmark Topic Watch Topic
  • New Topic