Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Database Problem


  • From: chakku@xxxxxxxxxxxxxxxx (chakku)
  • Subject: Database Problem
  • Date: Sat, 20 Mar 1999 15:51:37 +0530

Dear Biju,
If you want to have a two stage deletion of records,have a boolean field in
the database which says marked_ for_deletion(yes/no).You can set this value
when you are checking the checkbox.That is,when the user checks the
checkbox,you update this field in the database for the selected/displayed
record to mark it for deletion.(You may have the default value in the
database as 'NO'.to prevent accidental deletion as well as to handle the
fresh inserts).
Once you have marked this for deletion,you can delete all the marked records
with one button click or any similar event,by envoking a delete query where
this field value is 'YES'.This is a simple and straight forward method.You
can design your JSP and Bean accordingly.
Have a getter and setter method for the Marked-for-deletion field in the
bean which can be set and updated to the database.Similarly you can change
the status of checkboxes in the display,when you are displaying multiple
records,as per the field value by employing a simple IF loop before the
checkbox is displayed,checking the field value stored in the Bean is YES or
NO.
HIH
regards,
chakku
----- Original Message -----
From: Biju Nambisan <biju.nambisan@xxxxxxxxx>
Sent: Monday, March 20, 2000 3:23 PM
Subject: Database Problem


> Hi! All,
>
> I have a requirement wherein I need to delete records from the database
> based on what the user selects...It is something like we delete a mail
> after checking the checkbox and then submitting it for deletion...I need
> to do this using Javabeans and JSP...Can somebody in the group provide
> some help...
>
> Regards,
> Biju
>
> ---
> To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
> To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx
>


---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx