on 02-19-2008 6:47 AM
GudDay,
I created education details iview which displays list of records for a person,Iam able to create new record and add it to the database table.But when it comes to delete iam not able to delete it from the database.
Can anyone explain me wat are the key fields i should mention in the backend so that after selecting a row and clicking delete button it deletes record from the database?
Awaiting ur reply.
Thanks,
Deepthi.
hi martina......
first read the row tht has been slected or jsut read the primary keys...
in your case it might be a roll no.
then use this syntax:
delete from <database table> where <field> = <value>.
---regards,
alex b justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gudday,
If i want to add another button to update database....Iam facing an ambiguity.Requirement is to hav 3 buttons
create,modify n delete on screen below education details records for particular pernr.Can i write code which will call same group with different bindings each time when i click one of thes three buttons??
1)If i click modify it should call group where the selected row contents are dispalayed in output screen and if i change n save it should b updated.
2)If i click delete it should delete row selected from both frontend and database.
3)If i click create it should display empty fields.
Awaitng your reply.
Thanks,
Deepthi.
hi martina..
create an attribute in the context with char1.
now when save is clcked...
in the on action method, update teh attribute to 'x'.
in the wddomodify view method...
check for the attribute, if it is x then method for save should be called.
if y, method for update,
if z, method for delete.
---regards,
alex b justin
Gudday,
I Created attribute char1 under type string and onaction raised char1 flag to different values based on the
functin(del,mod,ins).using case statement i performed operations by calling function modul,which was created to perform ins and mod operation in wddomodifyview ....should i do attribute char1 binding?if so where??
only wddoinit code is executed....the code written in wddomodifyview is not working...actually how is the control flowing??when will wddomodifyview be executed??
Awaiting ur Reply.
Thanks,
Deepthi.
hi martina.....
whenerver there is an action executed or a change in the view, the wddomodify method will be called....
so when save is clcked....
the attribute is set to 's'.
then control moves to wddomodify.
read the attribute.
call the corresponding fm.
when delete is clcked....
the attribute is set to 'd'.
then control moves to wddomodify.
read the attribute.
call the corresponding fm.
and it contiues.
but at the end of wddomodify, clear the attribute.
or better have seperate methods and call tehm whenever the particular button is clicked.
---regards,
alex b justin
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.