clarification
David thinks this is a duplicate. I'm aware of that other question, I'm referring to the answer there. It just doesn't solve my problem; for instance I don't see the CreateDatabase property in the Object Inspector.
I am acquainted with Delphi, but this is the first time I need a database in a project. Using Delphi XE8.
In this answer to another question I found a script to create a database, which I used verbatim:
SET SQL DIALECT 3;
SET NAMES UTF8;
SET CLIENTLIB 'C:\fb25\bin\fbclient.dll';
CREATE DATABASE 'D:\MyProject.fdb'
USER 'sysdba' PASSWORD 'masterkey'
PAGE_SIZE 16384
DEFAULT CHARACTER SET NONE;
SET TERM ^ ;
CREATE PROCEDURE MY_PROC RETURNS (aParam INTEGER) AS
BEGIN
aParam = 10;
END^
But I'm having problems with FDConnection1. In its parameters I entered a database filename, but I don't see the CreateDatabase property said answer mentions. When I execute
FDScript1.ExecuteAll;
nothing happens.
How can I create my database? And where can I set CreateDatabase=yes?
edit 1: What I tried
I created a VCL application with a TFDScript (FDScript1) and a TFDConnection (FDConnection1). I entered the above script in the FDScript1.SQLScripts property and assigned FDConnection1 to its Connection property.
For FDConnection1 I set DriverName to "FB", entered a ConnectionName and entered a filename (full path) in params.database.
David points out that my assumption that CreateDatabase would be a Property is wrong. Should this then be in the script? (It does already say "CREATE DATABASE".)
TFDConnectionin the Object Inspector. What I see is information about usingTFDScript. If you have information about how you have setup theConnectionproperty of yourTFDScriptplease share it. If the question is asking to solve your specific attempt to follow the instructions, provide exact details of your steps so far.ParamsI think: docwiki.embarcadero.com/Libraries/en/…paramsseem to be a TStringList, though you can also assign the values through the Object Inspector, or as object members in code:FDConnection1.Params.Database := 'D:\myproject\dakota2.fdb';. Thanks for your time.