How to create a new interbase database file? lazarus / 16-Databases ---------------------------------------------------------------------- Guest · 2006-02-07 03:01 I am using Lazarus 0.9.10 under win98,and Borland InterBase 6.0 free version was installed.Here is a test application: Code: [Select]unit TestUnit; {$mode objfpc}{$H+} interface uses   Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, sqldb,   IBConnection, Buttons; type   { TForm1 }   TForm1 = class(TForm)     Button1: TButton;     IBConnection1: TIBConnection;     SQLQuery1: TSQLQuery;     SQLTransaction1: TSQLTransaction;     procedure Button1Click(Sender: TObject);   private     { private declarations }   public     { public declarations }   end; var   Form1: TForm1; implementation { TForm1 } procedure TForm1.Button1Click(Sender: TObject); begin   SQLTransaction1.Database := IBConnection1;   SQLQuery1.Database := IBConnection1;   IBConnection1.DatabaseName := 'd:\MyBase\testDB.gdb';   IBConnection1.Connected := True;   SQLQuery1.SQL.Add('Create DataBase ''d:\MyBase\test1.gdb'' USER ''SYSDBA'' PASSWORD ''masterkey'';');   SQLQuery1.ExecSQL; end; initialization   {$I TestUnit.lrs} end.   And the properties of each component were set at design time:   IBConnection1.HostName := localhost;   IBConnection1.Password := masterkey;   IBConnection1.UserName := SYSDBA;   IBConnection1.Transaction := SQLTransaction1;     SQLQuery1.Transaction := SQLTransaction1;   SQLQuery1.DataBase := IBConnection1;   SQLTransaction1.DataBase := IBConnection1;   The application was built ok.but when I run it and click the button1,there is an error :   IBConnection1 : PrepareStatement:   -Dynamic SQL Error   -SQL Error code = -104   -Token unknown - line 1, char 26   -SYSDBA.     press OK to ignore.   prees Cancel to stop the program.     Who can tell me what is the matter,please? ---------------------------------------------------------------------- matthijs · 2006-02-07 14:20 Are you sure you are connected to the IB/FB server? I tested is myself as well. I get the error: "Cannot prepare a CREATE DATABASE/SCHEMA statement". So maybe it is not yet supported. ---------------------------------------------------------------------- Anonymous · 2006-02-08 01:13 The IB server is run automatically every time when I start win98,I guess that this is because the installation program has set the autoexexc.bat file to behaviour like that.If I run the console application 'IBConsole' and issue the command Code: [Select] Create DataBase ''d:\MyBase\test1.gdb'' USER ''SYSDBA'' PASSWORD ''masterkey''; in the command line,the file 'd:\MyBase\test1.gdb' would be created.Can I draw the conclusion that I have connected to the IB server from this?   My English is not well.Hope you can understand me.