Page 1 of 1

DDL execution problem

Posted: 30.03.2021, 15:46
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

Re: DDL execution problem

Posted: 31.03.2021, 08:08
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.

Re: DDL execution problem

Posted: 19.10.2021, 15:53
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.

Re: DDL execution problem

Posted: 19.10.2021, 16:23
by marsupilami
Please use TZSQLProcessor.