FireDAC + EntityDAC + DataSnap

Re: FireDAC + EntityDAC + DataSnap

Postby AlexP » Mon 15 Aug 2016 11:13

We have reproduced this behavior on the highest versions of RAD Studio and FireDAC. This code works on XE 5. We will investigate this behavior and let you know the results.
AlexP
Devart Team
 
Posts: 5519
Joined: Tue 10 Aug 2010 11:35

Re: FireDAC + EntityDAC + DataSnap

Postby elion » Tue 16 Aug 2016 07:34

I am using Delphi XE7 Update 1
elion
 
Posts: 29
Joined: Wed 10 Dec 2014 07:15

Re: FireDAC + EntityDAC + DataSnap

Postby AlexP » Tue 16 Aug 2016 10:20

This behavior is due to a modification in FireDAC (starting from XE7). When setting the ConnectionDefName property first, and then - DriverName (similarly to the one specified in Connection Define), the driver name is not found in the TFDCustomConnection.SetDriverName method - and the set ConnectionDef is reset.

Code: Select all
FDConnection.ConnectionDefName := 'testMySQL';
FDConnection.DriverName := 'MySQL';// similarly to testMySQL Connection Define
ShowMessage(FDConnection.ConnectionDefName);//empty
AlexP
Devart Team
 
Posts: 5519
Joined: Tue 10 Aug 2010 11:35

Re: FireDAC + EntityDAC + DataSnap

Postby elion » Tue 16 Aug 2016 13:27

Hi Alex,

thank you for the info. I've reproduced it too. So, could you fix it in the EntityDAC? Or will it stay "buggy" in the XE7?

Best regards!
elion
 
Posts: 29
Joined: Wed 10 Dec 2014 07:15

Re: FireDAC + EntityDAC + DataSnap

Postby AlexP » Tue 16 Aug 2016 13:46

We will try to avoid this behavior in our components, but you can also send a bugreport to embarcadero
AlexP
Devart Team
 
Posts: 5519
Joined: Tue 10 Aug 2010 11:35

Re: FireDAC + EntityDAC + DataSnap

Postby elion » Tue 16 Aug 2016 13:56

Okay, thx, it would be great if you could fix it.
Last edited by elion on Tue 16 Aug 2016 16:12, edited 1 time in total.
elion
 
Posts: 29
Joined: Wed 10 Dec 2014 07:15

Re: FireDAC + EntityDAC + DataSnap

Postby elion » Tue 16 Aug 2016 16:12

In the doc of FireDAC this behaviour is as designed. Please see http://docwiki.embarcadero.com/Libraries/XE7/en/FireDAC.Comp.Client.TFDConnection.DriverName
elion
 
Posts: 29
Joined: Wed 10 Dec 2014 07:15

Re: FireDAC + EntityDAC + DataSnap

Postby elion » Thu 18 Aug 2016 12:49

Hey Alex,

I don't want to be annoying... are there some news? I need this functionality ASAP. Thank you and sorry for the pressure!

Best regards!
elion
 
Posts: 29
Joined: Wed 10 Dec 2014 07:15

Re: FireDAC + EntityDAC + DataSnap

Postby AlexP » Fri 19 Aug 2016 10:03

Currently, you can add the following changes to the EntityDAC.DataProvider.FireDAC file:
in the SetDialectName method add a check:
replace

Code: Select all
    if DialectName = UpperCase(SMySQLDialect) then


with

Code: Select all
    if (DialectName = UpperCase(SMySQLDialect)) and (FFDConnection.DriverName <> SFDDriverMySQL)
then
AlexP
Devart Team
 
Posts: 5519
Joined: Tue 10 Aug 2010 11:35

Re: FireDAC + EntityDAC + DataSnap

Postby elion » Thu 22 Sep 2016 07:42

Hi Alex,

it still doesn't work. Is there any release planned for this year to fix the firedac coonection pooling problem? It would be great!

Best regards!
elion
 
Posts: 29
Joined: Wed 10 Dec 2014 07:15

Re: FireDAC + EntityDAC + DataSnap

Postby AlexP » Fri 02 Dec 2016 13:41

We added the ConnectionDefName parameter in ConnectionString, now you do not have to set a dialect, it is enough to specify the ConnectionDef name.
AlexP
Devart Team
 
Posts: 5519
Joined: Tue 10 Aug 2010 11:35

Previous

Return to EntityDAC