FireDAC + EntityDAC + DataSnap

Discussion of open issues, suggestions and bugs regarding EntityDAC
AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: FireDAC + EntityDAC + DataSnap

Post by 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.

elion
Posts: 29
Joined: Wed 10 Dec 2014 07:15

Re: FireDAC + EntityDAC + DataSnap

Post by elion » Tue 16 Aug 2016 07:34

I am using Delphi XE7 Update 1

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: FireDAC + EntityDAC + DataSnap

Post by 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

elion
Posts: 29
Joined: Wed 10 Dec 2014 07:15

Re: FireDAC + EntityDAC + DataSnap

Post by 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!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: FireDAC + EntityDAC + DataSnap

Post by 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

elion
Posts: 29
Joined: Wed 10 Dec 2014 07:15

Re: FireDAC + EntityDAC + DataSnap

Post by 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

Post by elion » Tue 16 Aug 2016 16:12

In the doc of FireDAC this behaviour is as designed. Please see http://docwiki.embarcadero.com/Librarie ... DriverName

elion
Posts: 29
Joined: Wed 10 Dec 2014 07:15

Re: FireDAC + EntityDAC + DataSnap

Post by 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!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: FireDAC + EntityDAC + DataSnap

Post by 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

elion
Posts: 29
Joined: Wed 10 Dec 2014 07:15

Re: FireDAC + EntityDAC + DataSnap

Post by 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!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: FireDAC + EntityDAC + DataSnap

Post by 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.

Post Reply