1. Please Write me a block of code which inserts data in database, (Use sports db) When end of record is reached, it ask the user wants to commit or not. If yes then commit all the records otherwise rollback all the changes.
commit / rollback are sql-isms and don't apply to ABL code.
DEFINE VARIABLE cState AS CHARACTER LABEL "State : " NO-UNDO.
FOR FIRST Customer NO-LOCK :
ASSIGN cState = Customer.State.
UPDATE cState.
MESSAGE 'Do you want to update this value to Db ?'
VIEW-AS ALERT-BOX QUESTION BUTTONS YES-NO UPDATE v_answer AS LOGICAL.
IF v_answer = TRUE THEN
DO:
/*
refeth same record or a buffer in EX-Lk and do update here
*/
END.
END.
since i am a beginner.
i did not get what to refetch in the do: end block.
can u help me.
Refee to Progress handbook and/or help pages for the keywords "FIND" / "DEFINE BUFFER" / "FIND-CURRENT" and work through the examples you find there.
Enough. You really should spend some time studying the documentation references that you have been given. We should not have to do your homework for you and you do nothing at all for yourself. You are equipped with a brain. Put it to work.
hi gus,
ya i m studying at this time and i have done other assignments on dyanamic temp tables, dyanamic Query, dyanamic browsers and working with XML by myself. I have only posted the questions releated to transaction and other basics, cause i was absent on this lecturres other i am doing well. i am also not only trying my own code but also this forums gives me a knowledge on how to optimize the codes also.
so another good point is that the forums will give me to share my thoughts with the others intelligent people like you.
so thank u.