TfrxSDACDatabase doesn't support OnBeforeConnect event.

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Saupg
Posts: 19
Joined: Wed 05 Nov 2008 11:53

TfrxSDACDatabase doesn't support OnBeforeConnect event.

Post by Saupg » Wed 05 Nov 2008 12:32

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.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 06 Nov 2008 10:02

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;

Saupg
Posts: 19
Joined: Wed 05 Nov 2008 11:53

Post by Saupg » Fri 07 Nov 2008 07:05

Thanks, it works!

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

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

Saupg
Posts: 19
Joined: Wed 05 Nov 2008 11:53

Post by Saupg » Fri 07 Nov 2008 13:34

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'.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 10 Nov 2008 14:47

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.

Saupg
Posts: 19
Joined: Wed 05 Nov 2008 11:53

Post by Saupg » Mon 10 Nov 2008 16:58

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?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 11 Nov 2008 10:43

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.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 11 Nov 2008 14:19

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.

Post Reply