Duplicate rows while using adapter.FetchTypedView

Posts   
 
    
Gabor
User
Posts: 97
Joined: 29-Jan-2005
# Posted on: 31-Mar-2005 12:02:12   

Hi,

I have a TypedView, and the following expression returns duplicate rows, despite that I set the AllowDuplicate parameter to false:

dim query as new MyTypedView

MyAdapter.FetchTypedView(query.GetFieldsInfo, query, False)

Interestingly, when I use a predicateexpression for one of the fields, (ComparisonOperator.Equal), I get the resultset without duplicates.

What am I missed?

Thanks

Gabor

Gabor
User
Posts: 97
Joined: 29-Jan-2005
# Posted on: 31-Mar-2005 21:32:12   

Found the error,

I used the same typedview object twice in the dataadapter.FetchTypedView method.

Apologize rage

Thanks

Gabor

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 31-Mar-2005 22:03:03   

Glad you solved it, Gabor. simple_smile

The reason the typed view isn't cleared before the fetch is that there might be a reason for fetching extra rows into an already fetched view. So you have to clear a typed view first before fetching it again if you want to fill it with new data but don't want to keep the old data around simple_smile

Frans Bouma | Lead developer LLBLGen Pro