Page 1 of 1

CREATE OR REPLACE FUNCTION with ZSQLProcessor

Posted: 25.08.2010, 19:29
by francis.rangel
Hi everbody!

I've been having problems to create a database with a Delphi application.

In this application I create the database and all of its objects based on a metadata backup file.

The creation of the database, tables, keys, indexes and almost everthing is fine. But when I try to create a function using the ZSQLProcessor I got the error: "unterminated dollar-quoted string at or near "$$ DECLARE (...)"

I've googled about the problem and got just one clue: I'm using a old psql to execute the create function command. But I don't know how to use a newer version of psql with the zeoslib components.

So, is there a way to execute a create function using zeoslib? I've already tried to upgrade my zeoslib to the 6.6 stable version and it haven't worked.

Thanks for your time.

Posted: 30.08.2010, 01:02
by mdaems
I'm afraid somebody will have to debug the ZSQLProcessor parser code with this case. Can you please give it a try? Essentially the problem seems to be that the parser splits the procedure somewhere in the middle of the function.

Mark

Posted: 03.12.2010, 18:42
by josimarz
Hello francis.rangel!

In the TZSQLProcessor component change Delimiter property to $$ and change the DelimiterType property to dtSetTerm.

Try!

Josimar