Hi, some times, some querys does not retrieve all records according he where clauses when there is Order By command in the end.
Ex:
sQL := ' SELECT TABLE1.*,'+
' T2.FIELD1,'+
' T3.FIELD2,'+
' FROM TABLE1 T1 '+
' LEFT JOIN TABLE2 T2 ON (T2.FIELD_ID = T1.FIELD_ID)'+
' LEFT JOIN TABLE3 T3 ON (P3.FIELD_ID = T3.FIELD_ID)';
if I dont add the "Order By", the records retrieve correctly, but if I add the order by, Ex: "Order by T1.FIELD_PK" the result only retrieve some records, for example, it should retrieve 15 records but only 2 records are retrieved.
Unidac + DSP + CDS + Order By in search problem
-
rrcanalista
- Posts: 12
- Joined: Mon 06 Feb 2012 20:53
-
AndreyZ
Re: Unidac + DSP + CDS + Order By in search problem
Hello,
This problem is caused by the specificity of the TDataSetProvider component work. To solve the problem, you should set the TDataSetProvider.Options.poRetainServerOrder option to True.
This problem is caused by the specificity of the TDataSetProvider component work. To solve the problem, you should set the TDataSetProvider.Options.poRetainServerOrder option to True.