Jump to content
ertank

FirebirdSQL client library parameter in INI

Recommended Posts

Hello,

 

I am trying to provide client library for FirebirdSQL database connection for a MARS-Server project. I tried a few different INI parameters, all failed including second line below

FireDAC.MAIN_DB.DriverID=FB
FireDAC.MAIN_DB.VendorLib="C:\Program Files\Firebird\Firebird_2_5\WOW64\fbclient.dll"
FireDAC.MAIN_DB.Database=C:\Program Files\Firebird\Firebird_2_5\examples\empbuild\EMPLOYEE.FDB

I wonder what I should be using to be able to use a fbclient.dll in another directory than the EXE file.

 

Thanks & Regards,

Ertan

Share this post


Link to post
42 minutes ago, ertank said:

Hello,

 

I am trying to provide client library for FirebirdSQL database connection for a MARS-Server project. I tried a few different INI parameters, all failed including second line below


FireDAC.MAIN_DB.DriverID=FB
FireDAC.MAIN_DB.VendorLib="C:\Program Files\Firebird\Firebird_2_5\WOW64\fbclient.dll"
FireDAC.MAIN_DB.Database=C:\Program Files\Firebird\Firebird_2_5\examples\empbuild\EMPLOYEE.FDB

I wonder what I should be using to be able to use a fbclient.dll in another directory than the EXE file.

 

Thanks & Regards,

Ertan

 

Yes. you can as long as fbclient.dll is the right one.

Share this post


Link to post
10 hours ago, c0d3r said:

Yes. you can as long as fbclient.dll is the right one.

This is not helping in my case. I get below error which indicates a completely different dll filename

First chance exception at $775DA8B2. Exception class EFOpenError with message 'Cannot open file "C:\dlp\MARS\Demos\EKON22\bin\fbclient.dll". The system cannot find the file specified'. Process EKON22ServerApplication.exe (13632)

That directory mentioned in above error is the EXE directory itself. My INI file has lines in my initial post. INI file stays in the same directory as EXE and have same filename with EXE. The MARS Engine is started using below lines. My MARS code base is latest available from GitHub.

procedure TMainForm.FormCreate(Sender: TObject);
begin
  FEngine := TMARSEngine.Create();
  try
    FEngine.Parameters.LoadFromIniFile;
    FEngine.AddApplication('DefaultApp', '/default', ['Server.*']);
    PortNumberEdit.Text := IntToStr(FEngine.Port);
    TMARSFireDAC.LoadConnectionDefs(FEngine.Parameters, 'FireDAC');
    StartServerAction.Execute;
    RenderEngines(MainTreeView);
  except
    FreeAndNil(FEngine);
    raise;
  end;
end;

If I am missing something, let me know, please.

Share this post


Link to post

fbclient.dll usually depends on other dlls (like msvcp100.dll, msvcr100.dll in FB 3.0), are they present?

Share this post


Link to post
Just now, Vandrovnik said:

fbclient.dll usually depends on other dlls (like msvcp100.dll, msvcr100.dll in FB 3.0), are they present?

This is FirebirdSQL 2.5.9. File I am putting in INI file is FirebirdSQL installation directory. I suppose anything necessary would be present there. Moreover, there is no problem for other applications to use that identical client DLL file.

 

I think this can be eliminated from possible reasons in my specific case.

Share this post


Link to post

I am not sure - in the directory C:\Program Files\Firebird\Firebird_2_5\WOW64, I do not have msvcp80.dll and msvcr80.dll (these were used in 2.5.9). I would try to put them there (32bits).

 

Also, the application which tries to load fbclient.dll - is it 32bit? That is my "favourite" mistake, mismatch between 32 and 64 bits.

Share this post


Link to post
1 minute ago, Vandrovnik said:

I am not sure - in the directory C:\Program Files\Firebird\Firebird_2_5\WOW64, I do not have msvcp80.dll and msvcr80.dll (these were used in 2.5.9). I would try to put them there (32bits).

This is 32Bit client directory for a 64bit installation for FirebirdSQL.

1 minute ago, Vandrovnik said:

Also, the application which tries to load fbclient.dll - is it 32bit? That is my "favourite" mistake, mismatch between 32 and 64 bits.

It is indeed 32bit application. No mistake here.

 

BTW, if you check the error message in my second post above, it is trying to load a DLL file in another directory (which is EXE directory) and saying file does not exists. Indeed there is no such file with EXE file and I am trying to figure an INI parameter to provide location of that file. If I copy just fbclient.dll file from C:\Program Files\Firebird\Firebird_2_5\WOW64 next to EXE and it works just fine.

Share this post


Link to post
6 minutes ago, ertank said:

BTW, if you check the error message in my second post above, it is trying to load a DLL file in another directory (which is EXE directory) and saying file does not exists. Indeed there is no such file with EXE file and I am trying to figure an INI parameter to provide location of that file. If I copy just fbclient.dll file from C:\Program Files\Firebird\Firebird_2_5\WOW64 next to EXE and it works just fine.

Sorry, I did not see it.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×