Re: How to execute a SP at Forms and commit its changes

From: Jeff <jeff_at_work.com>
Date: Mon, 17 Mar 2003 13:56:20 GMT
Message-ID: <b54k64$322$2_at_cronkite.cc.uga.edu>


If you simply must do it this way, there's nothing that prevents you from creating another SP to call SP1 that also has the commit or rollback in it, assuming you don't want to change SP1 to do the commit or rollback. The error you're getting about the commit is a Forms one, not a database error.

However, I agree with Dan and others that suggest that there are better ways than this. Consider using database triggers.

In article <2648014.1047746705_at_dbforums.com>, ariadnedbka <member25721_at_dbforums.com> wrote:
>
>I will try to explain better.
>
>I have to insert a record in a table, let's say TABLE1.
>
>After the record is insert sucessfully at the database (same for update
>and delete), I have to call a stored procedure (let's say SP1) that will
>update other tables based on the values just inserted at TABLE1.
>
>The procedure SP1 returns an error code to the forms.
>If SP1 returns without any error, I have to COMMIT its changes.
>If SP1 returns with error, I have to ROLLBACK.
>But in any case I cannot touch the changes made at TABLE1 before running
>the stored procedure.
>
>Hope this is better :-)
>
>Thanks for your help
>Ariadne
>
Received on Mon Mar 17 2003 - 14:56:20 CET

Original text of this message