Create database (Firebird)

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
chkaufmann
Posts: 82
Joined: Sat 01 Jul 2006 11:42

Create database (Firebird)

Post by chkaufmann » Wed 25 Feb 2009 12:51

Hi,

I saw that there is code to create a new (empty) database with Interbase/Firebird, deep in the library (In IBCClassesUni.pas).

But what is the correct component (and settings) to use to create a new database?

cu Christian

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 26 Feb 2009 08:04

You can execute CREATE DATABASE statement from the TUniScript component. Such statement is executed using the CreateDatabase method from IBCClassesUni.

chkaufmann
Posts: 82
Joined: Sat 01 Jul 2006 11:42

Post by chkaufmann » Thu 26 Feb 2009 08:59

Plash wrote:You can execute CREATE DATABASE statement from the TUniScript component. Such statement is executed using the CreateDatabase method from IBCClassesUni.
Can you provide some sample code? I tried this, but for TUniScript I need a connection and once I call Execute, the library tries to connect to the non existing database.

cu Christian

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 26 Feb 2009 09:54

The current version of TUniScript requires the connection to an existing database to be opened before executing the script.

We'll consider possibility to add support for executing the CREATE DATABASE statement without opened connection in one of the next UniDAC builds.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 04 Mar 2009 12:02

In the next UniDAC build we'll add the NoPreconnect property to TUniScript. You should set it to True for executing CREATE DATABASE statement.

Post Reply