I want to save a record the I edited but I want to put the code under the save button and I have something like this:
DECLARE
l_rowid VARCHAR2(30);
CURSOR exists_cur
IS SELECT ROWID FROM tab_A
WHERE id = :tab_A .id;
BEGIN
IF :global.l_add = 't' THEN
COMMIT_FORM;
END IF;
IF :global.l_edit = 't' THEN
FETCH exists_cur INTO l_rowid;
IF exists_cur%FOUND THEN
UPDATE tab_a
SET field_1=:tab_A .field1, tab_A .SURNAME =:tab_A .SURNAME
WHERE ROWID = l_rowid;
ELSE
COMMIT_FORM;
END IF;
END IF;
CLEAR_FORM;
GO_FIELD('add_btn');
END;
Instead this just makes the my pc to hang can somebody tell me what makes it(pc) hang and how can save the updated info.
DECLARE
l_rowid VARCHAR2(30);
CURSOR exists_cur
IS SELECT ROWID FROM tab_A
WHERE id = :tab_A .id;
BEGIN
IF :global.l_add = 't' THEN
COMMIT_FORM;
END IF;
IF :global.l_edit = 't' THEN
FETCH exists_cur INTO l_rowid;
IF exists_cur%FOUND THEN
UPDATE tab_a
SET field_1=:tab_A .field1, tab_A .SURNAME =:tab_A .SURNAME
WHERE ROWID = l_rowid;
ELSE
COMMIT_FORM;
END IF;
END IF;
CLEAR_FORM;
GO_FIELD('add_btn');
END;
Instead this just makes the my pc to hang can somebody tell me what makes it(pc) hang and how can save the updated info.