Subject Re: [IBO] Execute procedure with Returning
Author Robert martin
Hi Helen

Thanks for your Sage advice. You were 100% correct. I rewrote the code
and discovered that insert component was tied to a different transaction
to what I thought it was !

What a painful day. Looking forward to going home right now !

Thanks again for you time and help :)

Rob

Helen Borrie wrote:
> At 01:54 PM 19/10/2009, you wrote:
>
>
>> However.... I now see it working (i.e. I can execute and get back an
>> incrementing return result. Unfortunately now the procedure seems to
>> not be adding the record it is supposed to. I have tested this in Flame
>> Robin and the following ....
>>
>> EXECUTE PROCEDURE pr_App_NewEntityAddress(1, '1505', NULL, '11', '1',
>> '1', '1', '1', '1', '1')
>>
>> returns a result AND inserts a record.
>>
>> However the EXACT same SQL from an IBOQuery or an IB_DSQL does not add
>> the record, it just returns the incremented result. The transaction is
>> commited. Considering the amount of time this is taking me I feel like
>> I need to be Commited to :)
>>
>> I can post the full procedure if you feel it would be useful?
>>
>
> If you tested it in FR and it works the way you expect then there's no reason to suspect the exact same statement doesn't work from your appl. I'd guess that either you're not committing afterwards when you think you are; or you're not refreshing the dataset that you are looking at after the transaction commits; or you are looking at the dataset in a different transaction from the one you're executing the DML in.
>
> Helen
>
>
>
>
>
> ------------------------------------
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more ! Yahoo! Groups Links
>
>
>
>
>