查询返回的模式与基本查询不同 [英] The schema returned by query is differ from base query

查看:26
本文介绍了查询返回的模式与基本查询不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在从数据网格视图中选择数据适配器和数据集后尝试通过查询生成器"添加查询时,我收到此错误查询返回的架构与基本查询不同"

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"

推荐答案

当您在设计器的数据集中创建 TableAdapter 时,主查询会建立可以作为该特定 TableAdapter 的一部分返回的列.如果您收到此错误,则您添加的新查询与原始查询的列不匹配.例如,如果您使用此原始查询建立数据集:

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

您会收到此错误,因为查询与它们返回的内容不匹配.添加查询"功能实际上是为了对类似需求(例如 CRUD、过滤搜索等)的 sql 查询进行分组.

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).

这篇关于查询返回的模式与基本查询不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆