Page 1 of 1

Cannot create Stored Procedure with Firebird Embedded 1.5

Posted: 31.10.2007, 14:32
by ste_ba
Hi,

I try to create a stored procedure that has already worked with FB Embedded 1.5, Zeos 6.5.1, Delphi7 and WinXP.

Now (with Delphi 2007, Zeos 6.6.1, and Vista, but still FB Embed 1.5) the very same StoredProc fails. Strange: within the error message, all the local variables used in the script show up as "?"s. The error itself says that "?" is an unknown token (surprise, surprise).

For example,

SELECT col1 FROM tab1 INTO :localvar1 WHERE id_col=:localvar2

is shown in the error message like

SELECT col1 FROM tab1 INTO ? WHERE id_col=?

No wonder Firebird doesn't understand. Anybody got any ideas how to make it work?

ste_ba

Posted: 31.10.2007, 20:45
by mdaems
Hi ste_ba,

What exactly are you doing? Using a query or ZSqlProcessor to create a stored procedure?

What happens here is that your sql is scanned for :var's, which are treated by the components as parametrized values. So Zeoslib decides it can use prepared statement syntax where all parameters are replaced by '?' to be bound in the next stage.

Try to set 'ParamCheck' property to false. This should avoid this behaviour.

Mark

Posted: 31.10.2007, 22:10
by ste_ba
Hi,

I use ZSqlProcessor, right. And the property change did exactly that *whew*

Zeos 6.5.1 ZSqlProcessor had no problems with Firebird Storedprocs and their local variables. Default behaviour must have been changed. Anyway, thanks a lot. You made my day :-)

ste_ba