Re: SQL$Forms Commit Procedure

From: Martin E. Cross <crossm_at_pth027.pt.Cyanamid.COM>
Date: Wed, 2 Feb 1994 20:32:58 GMT
Message-ID: <CKM6Ey.7Dy_at_cyanamid.uucp>


--

In article <2im89h$232_at_reeve.research.aa.wl.com>, ditommm_at_aa.wl.com writes:

|> Path: cyanamid!newsserver.jvnc.net!howland.reston.ans.net!cs.utexas.edu!swrinde!sgiblab!sgigate.sgi.com!olivea!decwrl!envoy.wl.com!reeve.research.aa.wl.com!usenet
|> From: ditommm_at_aa.wl.com
|> Newsgroups: comp.databases.oracle
|> Subject: SQL$Forms Commit Procedure
|> Date: Tue, 01 Feb 94 13:45:13 EST
|> Organization: Warner-Lambert Parke-Davis Research
|> Lines: 14
|> Message-ID: <2im89h$232_at_reeve.research.aa.wl.com>
|> NNTP-Posting-Host: cbpc04.research.aa.wl.com
|> Mime-Version: 1.0
|> Content-Type: TEXT/PLAIN; charset=US-ASCII
|>
|>
|> I have a form (SQL*Forms 3.0 on VAX/VMS) which makes changes to tables directly
|> through PL/SQL procedures that contain INSERT, UPDATE and DELETE statements.
|> Sometimes these changes are the only changes made during the current session.
|> If the user COMMIT's the error message '40401 - no changes to commit' appears.
|> Is there any way to let SQL*FORMS know that thre really is something to commit
|> - perhaps by changing FORM_STATUS directly? If I do the COMMIT in a user exit
|> then the records are locked until the user exits SQL*Forms, since I cannot
|> RELEASE without disconnecting from the database.
|>
|> Thanks for any assistance.
|>
|> Matteo diTommaso
|> ditommm_at_aa.wl.com
|>
Of the many ways to deal with this situation, I like to have fun with the ON-ERROR trigger. Receipe: Write ON-ERROR trigger at form level (or at some other level depending on your tastes) and include the following PL/SQL: if error_code = 40401 then message('I`m thinking, but nothings comming.....'); else :GLOBAL.error_code := error_code; :GLOBAL.error_text := error_text; message('FRM-'||:GLOBAL.error_code||': '||:GLOBAL.error_text); end if; Any time error 40401 is encountered, user will see the message "I`m thinking, but nothings comming..."; the "ELSE" section will display other error messages in true Oracle fashion. Check out the ON-ERROR trigger, you can change the messages for the various form errors and dress up your forms. ============================================================= | rec.arts.marching.drumcorps |------------------------------ Martin E. Cross | Sunrisers ('90) - Soprano American Cyanamid | Cybercorps - Soprano crossm_at_pt.Cyanamid.COM | Jersey Coast Sound - Contra |==================================== | rec.sport.paintball |------------------------------ | Pirahna-LB, Promaster-SI, Vents. =============================================================
Received on Wed Feb 02 1994 - 21:32:58 CET

Original text of this message