Page 1 of 1

Firebird, connection without database

Posted: Tue 22 May 2012 13:44
by Giovanna
Hi, I use delphi 7 with unidac 416 on windows XP.
How can I connect to firebird server without database for create with script SQL a new database ?
Thanks.
Giovanna Cellitti.

Re: Firebird, connection without database

Posted: Wed 23 May 2012 09:44
by ZEuS
Hello.

UniDAC provides most common interface for working with different databases.
Such database-specific function like creating a database is not provided by UniDAC.
It's better to use IBDAC components to perform such tasks, because the TIBCConnection component has the CreateDatabase method that allows to create a database without connecting to Firebird.
When using UniDAC the only way to create a database is to connect to any existing database and then execute the CREATE DATABASE statement using TUniScript. After doing this, TUniConnection will be connected to the newly created database automatically.

Re: Firebird, connection without database

Posted: Thu 24 May 2012 14:34
by PA64
Hello

You don’t need a connection to an existing database.
Set the TUniScript NoPreconnect property to true.

Re: Firebird, connection without database

Posted: Fri 25 May 2012 08:54
by ZEuS
Hello.

Yes, you are right, the TUniScript component has the NoPreconnect property that allows to execute CREATE DATABASE commands without connecting to an existing database.

Re: Firebird, connection without database

Posted: Mon 28 May 2012 15:09
by Giovanna
Hello,
I tried and it works properly, thanks to all!
Giovanna