BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SimpleDataset: wrong number of join results

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Stefan Becker
Guest





PostPosted: Mon Apr 26, 2004 5:51 am    Post subject: SimpleDataset: wrong number of join results Reply with quote



Hi!
I have the following problems with Interbase6/dbExpress/TSimpleDataSet:

1) If I use a left join statement with in this case 4 tables somtimes it
happens that the numer of results was wrong.
I had a little problem to reproduce this but then I find a way. If I set
SimpleDataSet.PacketRecords to 1 it allways happens. The problem is the sort
criteria. If I sort the result by a field in one of the secondary tables,
the number of results is wrong.
e.g. select a.name, b.order from NAMES a left join ORDERS b on a.Id = b.ID
order by b.ID descending
So the correct number of the results is 10 but 2 came. If I sort ascending 4
result are shown!?

2) My second problem is that if I sort (in SQL statement) by a field not in
the result set the records are not sorted inside the dataset!? So I have to
get all the fields I don't want to show but to order by.

I tried to debug the problem but it looks like a problem inside MIDAS.
With TSQLQuery everything works fine!!

Nows someone a workaround or a fix?

Thanks for help!

Stefan


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.