karmicdice
karmicdice

Reputation: 1061

The schema returned by query is differ from base query

When I Tried to add query by "Query Builder" after selecting data adapter and data set from datagrid view I receive this error "the schema returned by query is differ from base query"

Upvotes: 2

Views: 5498

Answers (1)

Joel Etherton
Joel Etherton

Reputation: 37543

When you create a TableAdapter in a dataset in the designer, the primary query establishes the columns that can be returned as a part of that specific TableAdapter. If you're getting this error then the new query you're adding doesn't match the columns of the original. For instance, if you establish a dataset with this original query:

Select UserId, UserName, UserCreated
From Users

and then try to add the following query:

Select UserId, UserName, NumberOfFailedLogins

you'll get this error because the queries don't match what they return. The "Add Query" feature really is meant to group sql queries for like requirements (e.g. CRUD, filtered searches, etc).

Upvotes: 1

Related Questions