Records missing in DataSnap

hsteigstra

Member²
It seems I have a problem with DOA in DataSnap. For some queries I am losing data. See for example this SQL:

SELECT 0 lng_id, 1 seq, 'Dutch' lng_name FROM Dual
UNION
SELECT 1 lng_id, 2 seq, 'English' lng_name FROM Dual
UNION
SELECT 1 lng_id, 1 seq, 'English' lng_name FROM Dual
UNION
SELECT 0 lng_id, 2 seq, 'Dutch' lng_name FROM Dual
ORDER BY 1

Debugging the server show 4 records and the Oracle Monitor also reports 4 records. However, only 1 row is displayed in the client. When I change the ORDER BY to 1,2 they reappear. I double checked this with dbExpress and that one works fine. I have this problem with several queries. Mostly I can manipulate the outcome by adding extra sort fields, but not with all of them........

What am I doing wrong?
 
You should probably set the UniqueFields to the fields that identify the record (lng_id;seq). In 4.0 you can set TOracleDataSet.ProviderOptions so that the DefaultOrder is not sent to the provider.
 
Back
Top