Cannot create Stored Procedure with Firebird Embedded 1.5

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
User avatar
ste_ba
Zeos Dev Team
Zeos Dev Team
Posts: 29
Joined: 15.02.2006, 20:26
Location: Lahntal
Contact:

Cannot create Stored Procedure with Firebird Embedded 1.5

Post 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
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
User avatar
ste_ba
Zeos Dev Team
Zeos Dev Team
Posts: 29
Joined: 15.02.2006, 20:26
Location: Lahntal
Contact:

Post 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
Post Reply