Creating a Firebird Database from Code

I am trying to create a firebird database from scratch and found the topic https://support.tmssoftware.com/t/create-mssql-database/7897.

I have tried the following

Statement := AureliusDBSchema.DBManager.Connection.CreateStatement;
Statement.SetSQLCommand(sql);
Statement.Execute;
Connection.Open;
AureliusDBSchema.BuildDatabase;

the sql is
CREATE DATABASE 'C:\projects\GiftAider-Online\GiftAider Online\Server Output\SystemTemplates\GATEMPLATEDB.FDB' USER 'SYSDBA' PASSWORD 'masterkey' PAGE_SIZE 16384 DEFAULT CHARACTER SET UTF8

But I get an error on the Statement.Execute as it tries to open the database. Is there a way to get it to execute without trying to open the database so it creates one?

I used the TFDConnection to do this (set OpenMode to OpenOrCreate)

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.