Answered How To Delete Multiple Selected Record In A Browse Widget?

Hello I am new here and I'm currently using progress openedge 10.2b for just 2 months :) I just want to know how to delete records in a table by selecting records in a browse widget and clicking a button with a Label delete. :)

Take note: Multiple Selection of records in the browse widget.
The table is set to no-lock.
 
Mr. Cringer,

This is my codes on the button trigger, let me do a shortcut on it :), info_file is the tablename.

Def Var infocount as int no-undo.

FIND info_file WHERE ROWID(info_file) EQ vrowid EXCLUSIVE-LOCK NO-ERROR.

IF AVAIL info_file THEN DO:
DO infocount = 1 TO br-info:NUM-SELECTED-ROWS:
br-info:FETCH-SELECTED-ROW(infocount).
DELETE INFO_file.
END.
br-info:DELETE-SELECTED-ROWS().
END.

Thanks :).. i have tried this but it says that the table is set to no-lock status...But i go exclusive-lock on syntax find sir. Please tell me what do I need
:)
 

Osborne

Active Member
You are missing the GET-CURRENT line:
Code:
DO infocount = 1 TO br-info:NUM-SELECTED-ROWS:
   br-info:FETCH-SELECTED-ROW(infocount).
   GET CURRENT br-info EXCLUSIVE-LOCK.
   DELETE INFO_file.
END.
br-info:DELETE-SELECTED-ROWS().
 
Mr. Osborne,

THANK YOU SO MUCH! :)) actually I'm on work now and finally I finished my assignment.

Again sorry for this simple question, I'm still on a process of learning this language :) and still willing to learn more.

Thanks sir..
 
Top