Subject RE: [Firebird-Architect] Re: RFC: Please unify stored procedure execution
Author Samofatov, Nickolay
Roman,

> Programmer writes following code:
>
> CallableStatement stmt = connection.prepareCall(sql);
>
> stmt.registerOutParameter(2, Types.INTEGER); stmt.setInt(1,
> 1); boolean hasResultSet = stmt.execute();
>
> At this point me, as driver developer, has to decide whether
> to use SELECT * FROM or EXECUTE PROCEDURE. How?

Firebird ODBC driver makes the decision based on presence of blr_send
verb (correspoding to SUSPEND statement) in stored procedure BLR.
To avoid parsing BLR directly it invokes pretty printer BLOB filter on
SP BLR and looks for 'blr_receive' as unquoted word.
This makes everybody using CALL syntax happy.

And with some caching you'll need not to invoke pretty printer too
often. :-)

> Roman

Nickolay