Subject Re: [firebird-support] re: Can't get Firbird 3.x embedded to work in Delphi 10.3 update 1?
Author Robert martin
Hi Chris

I haven't been following the thread, so this may be totally of track but, Embedded only supports one connection.  If you try to connect a second instance you get the database unavailable error message you are seeing.  Is it simply that you have something else (your app or a DB tool?) connected to the DB already when you are trying from the IDE?

Cheers
Rob

On 30/04/2019 1:41 PM, 'Chris LeFebvre' lefebvrec@... [firebird-support] wrote:
 

Eric:

 

Thanks for your help, the example went a long way to getting my problem fixed. These are the steps I took and the results:

 

I saved your programs files to a unique directory, created a new empty project and added your .pas file to the project; added the 64bit platform to the project and made it active, copied the test employees database to the Debug directory along with the files from the Firebird x64 kit and set the text of the TEdit to the full path to the database. I was able to connect both in designtime and runtime. I copied my database to the Debug directory and changed the text of the Tedit to be my database and again I was able to connect both in designtime and runtime.

 

I examined the project that I was w orking on and really had a hard time pining down what exactly was the difference because everything seemed to be the same but when I added your code (customized to my component names and details):

 

  FDConnection1.Params.Clear;

  FDConnection1.DriverName := 'FB';

  FDConnection1.Params.Database := Edit1.Text;

  //FDConnection1.Params.UserName := 'SYSDBA';

  //FDConnection1.Params.Password := 'masterkey';

  FDPhysFBDriverLink1.VendorLib := 'fbclient.dll';

  FDPhysFBDriverLink1.Embedded := True;

  FDConnection1.Connected := True;

  MessageDlg('Connection OK !', mtInformation, [mbOK], 0);

& nbsp;

I got my program to work during runtime but I still can’t get it to connect during designtime, even though each of the parameter options appear to be exactly what your code is setting them to I still get “Unavailable database” when I check off Connected in the IDE.

 

I’ll have to work on this a little more but there must be some parameter that is set incorrectly in designtime that is cleared during runtime by the FDConnection1.Params.Clear statement, at least that’s my current theory. If I