Subject | Re: [firebird-support] re: Can't get Firbird 3.x embedded to work in Delphi 10.3 update 1? |
---|---|
Author | Robert martin |
Post date | 2019-04-30T21:51:39Z |
Rob
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