DDL execution problem

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
eversun
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 28.01.2020, 09:31

DDL execution problem

Post by eversun »

Have fresh ZEOS, just updated from SVN R7413, but same problem appeared with my previous archive valid for several months.

Trying to execute DDL statement:
create or alter procedure VERIFY_ADMIN2 (
... some input declarations ...)
returns (
... some output declarations ...)
as
declare variable ... several variables here
begin
...
end

Got error message with TQuery.ExecSQL:
SQL Error: Dynamic SQL Error; SQL error code = -104; Token unknown - line 1, column 417; Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements

Query.Params reports all the variables declared in "as ... begin" !!!

Temporary solution found is setting ParamCheck to False
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: DDL execution problem

Post by marsupilami »

Please use our script component for that kind of operations. It also allows you to set the terminator - like using set term or using ^ instead of ; as the terminator.
hamacker
Junior Boarder
Junior Boarder
Posts: 37
Joined: 13.10.2021, 15:15

Re: DDL execution problem

Post by hamacker »

HI, where I find it? name?
In my Lazarus there is not a component named ZScript, maybe another name?
I'am doing wrong too, using ExecSQL to create DDL objects.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: DDL execution problem

Post by marsupilami »

Please use TZSQLProcessor.
Post Reply