Subject Re: [IBO] Problem with a create database script
Author Helen Borrie (TeamIBO)
At 10:52 PM 18-02-02 +0100, you wrote:
>Hi all,
>I am new on this list.

Hi Heri!

>My problem is: My script to create and populate a new DB runs fine in WISQL, but executed by TIB_Script there is a problem with this statement:
>execute procedure NewKoerperschaftKategorie 'OpenSource Team';


>IBO 4.2.Fr / WISQL 5.5 / D5 Pro

I think possibly your problem has to do with not understanding what a script is for...

WISQL is a graphical interface to the command-line program isql.exe for versions of InterBase lower than IB 6. "isql" is a mnemonic for "interactive sql" - it's a tool for for querying the database interactively.

A script is a batch of interactive SQL statements that isql can run as if each statement had been submitted to the program individually.

Normally, you run a script to define database objects. It is also possible to include "DML" statements, i.e. SQL statements that can manipulate (insert, update, delete) data. At the simple level of creating a database and populating your control tables with "standard data", a script is a way of automating administrative jobs in a repeatable fashion (and also an excellent way to document your database).

You can't treat an isql script as a way to program a client application. It is NOT a scripting language - think of it as a "cross-platform batch file tool". So, for your problem situation, your procedure call fails because the engine has no destination (e.g. a pending call from a client application) to pass the return parameter.

TIB_Script encapsulates the way isql handles a script and the commands that you could enter into isql in an interactive session, nothing more. For a really simple example of using a TIB_Script, take a look at the first tutorial in the IBO /Tutorials folder. There, Jason's code checks to see whether the database file exists and, if not, it runs a script to create it and populate it with a little data.

Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at