Subject Re: problem with tjvuibscript
Author Adam
--- In, "martinknappe" <martin@...>
> hi,
> this post is more appropriate in the uib forum (where i've also
> posted) but it doesn't seem to be too busy so i was wondering whether
> someone here is working with delphi+uib database access controls. this
> is my problem:
> i have a database creation script, that runs very well when executed
> from say ibexpert, but when executing it from tjvuibscript, i run into
> seems to have to do with the "set term" - statement..would
> someone please try to execute it and tell me whats wrong?
> this is the script(can someone help me out here, thanx):

I haven't run the script because I haven't the time, but it looks ok
at initial glance. If it works in iSQL, then there is nothing wrong
with the script.

SET TERM is not a command that gets sent to the database, it is rather
a directive to the client application (eg iSQL) that you wish to
change the character that represents the end of a statement.

When the client runs, it will take all the text up until the first ';'
and send that through as a query, then take all the text up until the
next ';' until the script is finished. A special command like SET TERM
tells it you want to now use something other than a ';' (usually
because PSQL blocks will probably have internal ';' characters which
would cause the client program to only submit half the query.

You will need to find out whether UIB is smart enough to break up the
separate DDL statements based on terminators. The source to all the
jedi stuff is available and is usually not too hard to follow.