Can't load library
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.
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
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.