Page 1 of 1

TfrxSDACDatabase doesn't support OnBeforeConnect event.

Posted: Wed 05 Nov 2008 12:32
by Saupg
Hello!

I migrate my project from ADO to SDAC and have problem with FastReport v4.
I use TfrxReport.OnBeforeConnect but TfrxSDACDatabase doesn't call this event.

Posted: Thu 06 Nov 2008 10:02
by Dimon
Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next SDAC build.
As a temporary solution, please find the TfrxDACDatabase.SetConnected method in the frxDACComponents.pas unit and change it to this code:

Code: Select all

procedure TfrxDACDatabase.SetConnected(Value: Boolean);
begin
  BeforeConnect(Value);
  FDatabase.Connected := Value;
end;

Posted: Fri 07 Nov 2008 07:05
by Saupg
Thanks, it works!

Another problem - how i can set windows authentication to SQL Server from FastReport?

p.s.> а можно общаться с вами по-русски? :)

Posted: Fri 07 Nov 2008 13:34
by Saupg
Problem is with type of query params.

I drop TfrxSDACQuery and write query like as 'EXEC StoredProc :PARAM1, :PARAM2'.
TfrxADOQuery determines type of parameters in params dialog automatically but TfrxSDACQuery always set 'Unknown'.

Posted: Mon 10 Nov 2008 14:47
by Dimon
An example of working with FastReport components using SDAC components and the TfrxDBDataset component (that is used as an adapter for TfrxReport) is shown in FastReport Demo.
In this case you can have all functionality of SDAC components, including Windows authentication in TMSConnection and parameters in TMSStoredProc.
You can find FastReport Demo by the following path: SDAC_InstDir\Demos\Win32\ThirdParty\FastReport\FR4\Demo\
SDAC_InstDir is the SDAC installation directory on your computer.

Posted: Mon 10 Nov 2008 16:58
by Saupg
Dimon,
thanks for your reply!

I can't use TfrxDBDataset because i have my own report server with TfrxReportServer component (it's server analog of TfrxReport).
All my FR3-files has own TfrxSDACDatabase (by FastReport's recommendations).

BTW, TfrxSDACDatabase already has some custom properties like as Server, Username, Password and etc. It will be very good if you add property 'Authentication' or support assigning Connection String (as TfrxADODatabase).

And what about problem with params?

Posted: Tue 11 Nov 2008 10:43
by Dimon
Saupg wrote:BTW, TfrxSDACDatabase already has some custom properties like as Server, Username, Password and etc. It will be very good if you add property 'Authentication' or support assigning Connection String (as TfrxADODatabase).
Thank you for advice. We will investigate the possibility of adding this functionality in the near future.

Posted: Tue 11 Nov 2008 14:19
by Dimon
Saupg wrote:And what about problem with params?
TfrxSDACQuery doesn't support determining type of parameters in similar queries. For this you should use the TMSQuery component.