Subject Re: [IBO] how to create database from script
Author Helen Borrie
At 03:28 PM 29/09/2003 +0200, you wrote:
>Hi List,
>
>I have a scrip that workes fine from within IB_Expert.
>There I can execute this script and create my database.
>
>How can I achieve the same result with "TIB_Script" using the same script
>file?
>
>I tried :
>
> GenDbScr.SQL.LoadFromFile(FSqlScript);
> GenDbScr.Sql.SaveToFile('C:\temp\spc.sql');
> GenDbScr.Execute;
>
>but here I get "Statement must have an IB_Connection assigned.
>Well I assigned my IB_Connection but then I get the
>"invalid database handle (no active connection)" message.
>
>Well then I set the DbConnection.Connected:=True and recieved the "can't
>finde file"message which is true, since I in this moment have no database....
>
>What is the right way to create a database with a given script?

There are plenty of examples in the Samples directory of your IBO
installation. Many of the demos use IB_Script to create their own databases.

Helen