Can't load library

edited March 2013 in FastReport 4.0
Hi everyone. Sorry for my english.

I am use fibplus and firebird database.
I'm trying to connect to the database is running the report.
My report is has got a TfrxFIBDatabase and TfrxFIBQuery.
I am define username, pass, database path in TfrxFIBDatabase in report design time. but if I change connected value to true, I get the following message 'Can't load library'
I try a lot of thing in my source code for define library like this.

op=DM->frxReport1->FindObject("DATABASE");
dynamic_cast<TfrxFIBDatabase *>(op)->Database->LibraryName="fbclient.dll";
dynamic_cast<TfrxFIBDatabase *>(op)->Database->Handle=DM->Database->Handle;
DM->frxReport1->PrepareReport();
but not working. please help me.

Comments

  • gpigpi
    edited 12:07PM
    Try to use LibraryName param in TfrxFIBDatabase.Params
  • edited March 2013
    hello to everyone. thank you for your answers. I could not answer because I'm out of town. I found the solution as follows.

    in c++builder
    op=DM->frxReport1->FindObject("FDATABASE");
    dynamic_cast<TfrxFIBDatabase *>(op)->SQLDialect=3;
    dynamic_cast<TfrxFIBDatabase *>(op)->Database->LibraryName="fbclient.dll";
    dynamic_cast<TfrxFIBDatabase *>(op)->DatabaseName=DM->Database->DBName;
    dynamic_cast<TfrxFIBDatabase *>(op)->Params->Clear();
    dynamic_cast<TfrxFIBDatabase *>(op)->Params->Add("user_name=SYSDBA");
    dynamic_cast<TfrxFIBDatabase *>(op)->Params->Add("password=masterkey");
    dynamic_cast<TfrxFIBDatabase *>(op)->Params->Add("lc_ctype=WIN1254");

    in fastreport coding.
    begin
    FDatabase.Database.Libraryname:='fbclient.dll';
    FDatabase.Database.Connected:=true;
    end.
    it is working. and fastreport is a magnificent tool.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.