Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Error 5115 using XE5 ENT and ADS V8



Permlink Replies: 4 - Last Post: Oct 28, 2014 11:53 PM Last Post By: Dmitry Arefiev
Leonardo Bidi

Posts: 4
Registered: 8/3/12
Error 5115 using XE5 ENT and ADS V8
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 24, 2014 7:25 AM
Hi all I'm using XE5 Enterprise with Firedac against ADS V8.

My problem comes out when I try to query over any table on my DD with an "order by" option, but not always happen, the tables I've tried with have a field char(30) which I want to order by.

If I order by another field like integer works fine or even I dont use any order, the query runs fine too.

Is this a problem with FD and my ADS V8 ?? Could be solved with XE6 or XE7 ? Does FD get better on those versions ?

Thanks.
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Error 5115 using XE5 ENT and ADS V8
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 25, 2014 11:21 PM   in response to: Leonardo Bidi in response to: Leonardo Bidi
My problem comes out when I try to query over any table on my DD with an "order by" option, but not always happen, the tables I've tried with have a field char(30) which I want to order by.

1) Do you use TFDTable or TFDQuery ?
2) Could you please provide:
* environment report:
http://docwiki.embarcadero.com/RADStudio/XE7/en/DBMS_Environment_Reports_(FireDAC)
* table DDL;
* call stack for the exception.

--
With best regards,
Dmitry Arefiev / FireDAC Architect
Leonardo Bidi

Posts: 4
Registered: 8/3/12
Re: Error 5115 using XE5 ENT and ADS V8
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 27, 2014 6:17 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Dmitry Arefiev wrote:
My problem comes out when I try to query over any table on my DD with an "order by" option, but not always happen, the tables I've tried with have a field char(30) which I want to order by.

1) Do you use TFDTable or TFDQuery ?
2) Could you please provide:
* environment report:
http://docwiki.embarcadero.com/RADStudio/XE7/en/DBMS_Environment_Reports_(FireDAC)
* table DDL;
* call stack for the exception.

--
With best regards,
Dmitry Arefiev / FireDAC Architect

Hi Dmitry thanks for answer.
While trying to provide the report , I can tell more information after doing more tests.
My environment and test are next.

Delphi XE5 Enterprise with ADS V8
Have a Datasnap server only with a connection to my Data Dictionary and a FDQuery.
In my DS Client I call the this FDQuery with sql parameters just simple as "select * from table" to show
the results on a grid to test speed, performance and something like that.

The table has about 60k records and the performances it's quite good to retrieve all the records.
Then we tried to do more filtered querys so we started to use "top n" and works fine again.
Later we started to to try with order by statment in the query, it works real fine when the records are
"filtered" with "top n" command also, because the are few records.

The problem start with we do a "select * from table order by xxx", and "xxx" it's a char field.
We asummed that the problem may be the collation of the table or that in any of the record,
the fdquery it's no able to order by some strange character in the field. The table its a dbf file
with ansi collation.

With other tables it works fine.

Is there any way to select the chartype of the fdquerys or fdconnection ?

Many thanks.

Leonardo

Leonardo Bidi

Posts: 4
Registered: 8/3/12
Re: Error 5115 using XE5 ENT and ADS V8
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 27, 2014 6:48 AM   in response to: Leonardo Bidi in response to: Leonardo Bidi
Leonardo Bidi wrote:
Dmitry Arefiev wrote:
My problem comes out when I try to query over any table on my DD with an "order by" option, but not always happen, the tables I've tried with have a field char(30) which I want to order by.

1) Do you use TFDTable or TFDQuery ?
2) Could you please provide:
* environment report:
http://docwiki.embarcadero.com/RADStudio/XE7/en/DBMS_Environment_Reports_(FireDAC)
* table DDL;
* call stack for the exception.

--
With best regards,
Dmitry Arefiev / FireDAC Architect

Hi Dmitry thanks for answer.
While trying to provide the report , I can tell more information after doing more tests.
My environment and test are next.

Delphi XE5 Enterprise with ADS V8
Have a Datasnap server only with a connection to my Data Dictionary and a FDQuery.
In my DS Client I call the this FDQuery with sql parameters just simple as "select * from table" to show
the results on a grid to test speed, performance and something like that.

The table has about 60k records and the performances it's quite good to retrieve all the records.
Then we tried to do more filtered querys so we started to use "top n" and works fine again.
Later we started to to try with order by statment in the query, it works real fine when the records are
"filtered" with "top n" command also, because the are few records.

The problem start with we do a "select * from table order by xxx", and "xxx" it's a char field.
We asummed that the problem may be the collation of the table or that in any of the record,
the fdquery it's no able to order by some strange character in the field. The table its a dbf file
with ansi collation.

With other tables it works fine.

Is there any way to select the chartype of the fdquerys or fdconnection ?

Many thanks.

Leonardo


More info...

As I told you before my dbf table has 60k records.
If I do this query "select top 100000 * from table order by xxx" works fine, but if I do the same query without to top "select * from table order by xxx" it gives me the error 5115.

I know that "select *" query it's something that I will not do often on large tables due to speed, of couse,
but even I try with very small tables, the error continues.

Thanks.
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Error 5115 using XE5 ENT and ADS V8
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 28, 2014 11:53 PM   in response to: Leonardo Bidi in response to: Leonardo Bidi
If I do this query "select top 100000 * from table order by xxx" works fine, but if I do the same query without to top "select * from table order by xxx" it gives me the error 5115.

There is no difference for FireDAC between these two queries. FireDAC handles them
the same way. It seems, that Advantage query processor fails due to some reason.
Probably it is a bug in Advantage. Try to upgrade your Advantage to latest version.

--
With best regards,
Dmitry Arefiev / FireDAC Architect
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02