|
-
Dec 1st, 2006, 10:44 AM
#1
Thread Starter
Addicted Member
[RESOLVED] [1.0/1.1]
Having problem with DataSet populated from MS Access db. It is generated from Union query and can contain not unique records, e.g. query result:
ID Amount
10 25
11 30
10 25
15 40
…
Dataset simply deletes repeated record, so in the dataset records presented as:
ID Amount
10 25
11 30
15 40
…
Because dataset populated from two quite similar tables, the uniqueness of records cannot be guaranteed (including more fields in the result query cannot it provide as well).
One solution can be: get two datasets from the both tables and add records from the second dataset to the first one, setting datarow ‘ID’ to some unique number. But I am wondering, is there any properties in a dataset object which will allow to keep all records, or may be there is some other simple way to solve this problem?
-
Dec 1st, 2006, 06:51 PM
#2
Re: [1.0/1.1]
DataSets don't simply delete records. The DataSet will contain whatever records your query returns. If you aren't getting the result you want then you're query is flawed.
-
Dec 2nd, 2006, 09:41 AM
#3
Thread Starter
Addicted Member
Re: [1.0/1.1]
Thanks for your suggestion. The problem was in union query, I missed keyword ALL which should be put after UNION, so the query did not return all rows. After using UNION ALL everything fixed.
-
Dec 3rd, 2006, 06:02 AM
#4
Re: [1.0/1.1]
Please mark this thread resolved from the Thread Tools menu above the first post.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|