Firebird, connection without database

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Giovanna
Posts: 25
Joined: Tue 21 Jul 2009 07:44
Location: Italy

Firebird, connection without database

Post by Giovanna » Tue 22 May 2012 13:44

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.

ZEuS
Devart Team
Posts: 240
Joined: Thu 05 Apr 2012 07:32

Re: Firebird, connection without database

Post by ZEuS » Wed 23 May 2012 09:44

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.

PA64
Posts: 2
Joined: Thu 24 May 2012 14:09

Re: Firebird, connection without database

Post by PA64 » Thu 24 May 2012 14:34

Hello

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

ZEuS
Devart Team
Posts: 240
Joined: Thu 05 Apr 2012 07:32

Re: Firebird, connection without database

Post by ZEuS » Fri 25 May 2012 08:54

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.

Giovanna
Posts: 25
Joined: Tue 21 Jul 2009 07:44
Location: Italy

Re: Firebird, connection without database

Post by Giovanna » Mon 28 May 2012 15:09

Hello,
I tried and it works properly, thanks to all!
Giovanna

Post Reply