Subject Re: [IBO] DSQL and EXECUTE PROCEDURE
Author Martijn Tonies
Hello Roger,

Thanks for the suggestion ... but --


> Why can't you just select it and display it in the grid?
>
> SELECT * FROM PROC_NAME(:PARAM_1,:PARAM_2)
>
> It then behaves just like any other dataset.

1) because it can be a non-selectable stored procedure. I'm not
creating this procedure.

2) because it's an interface for writing ad-hoc statements, I don't
control what the user enters. In this particular case, I'm faced with
a problem and I'm trying to understand the technical issue...

> You can join it to another query like this:
>
> SELECT A.*,B.* FROM TABLE_A A
> LEFT OUTER JOIN PROC_NAME(A.FLD_1,A.FLD_2) B
> ON 1 = 1

See above.

> I don't think you should do this if the procedure makes any data
> modifications in the process of returning its values. I seem to
> remember that Helen says you shouldn't do so in her book, and in case
> you need any further reason, It seems to screw up IBOs automatic
> transaction handling and the modified records remain busy for ever.

See above.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com