Hi, to help implement TIBCScript for executing CONNECT and CREATE DATABASE commands.
Delphi XE, Firebird 2.5, IBDAC 3.60.0.23 pro, Windows 7
how can implement TIBCScript for executing CREATE DATABASE?
-
AndreyZ
Hello,
You can create a Firebird database using the TIBCScript component in the following way:Also note that you can use the TIBCConnection component to achieve the same result. Here is an example:
You can create a Firebird database using the TIBCScript component in the following way:
Code: Select all
IBCScript.Connection := IBCConnection;
IBCScript.SQL.Clear;
IBCScript.SQL.Add('CREATE DATABASE');
IBCScript.SQL.Add('''DatabaseName''');
IBCScript.SQL.Add('USER ''SYSDBA''');
IBCScript.SQL.Add('PASSWORD ''masterkey''');
IBCScript.SQL.Add('PAGE_SIZE 4096');
IBCScript.SQL.Add('DEFAULT CHARACTER SET WIN1251');
IBCScript.Execute;Code: Select all
IBCConnection.Database := 'DatabaseName';
IBCConnection.ClientLibrary := 'fbclient.dll';
IBCConnection.Params.Clear;
IBCConnection.Params.Add('USER ''SYSDBA''');
IBCConnection.Params.Add('PASSWORD ''masterkey''');
IBCConnection.Params.Add('PAGE_SIZE 4096');
IBCConnection.Params.Add('DEFAULT CHARACTER SET WIN1251');
IBCConnection.CreateDatabase;