填充datagrid惠特查询中的错误 [英] error in fill datagrid whit query

查看:83
本文介绍了填充datagrid惠特查询中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个DataGridView,我向其中添加了查询,执行后,我的查询将引发此错误:

Hi,
I have a DataGridView and I add my query to this, when executed my query throws this error:

新查询返回的架构与基本查询不同

The schema returned by the new query differs from the base query


这是我的查询:


and this my query:

SELECT     B.SettingKey, 'SysSettingsDep' AS TableName, B.SettingValue, B.SettingDesc
FROM         SysCustomer AS A INNER JOIN
                      SysSettingsDep AS B ON A.SettingKey = B.SettingKey
UNION
SELECT     C.SettingKey, 'SysSettingsMachine' AS TableName, C.SettingValue, C.SettingDesc
FROM         SysCustomer AS A INNER JOIN
                      SysSettingsMachine AS C ON A.SettingKey = C.SettingKey
UNION
SELECT     D.SettingKey, 'SysSettings' AS TableName, D.SettingValue, D.SettingDesc
FROM         SysCustomer AS A INNER JOIN
                      SysSettings AS D ON A.SettingKey = D.SettingKey


帮我解决这个问题,
tnx


help me to solve this,
tnx

推荐答案



我在类似的问题上发现了很多线程,您检查了吗?

[
Hi,

I found so many threads on the similar issue, have you checked that ?

this[^] seems very useful for you.

check the first answer in above discussion.

Thanks.


尝试使用select *代替特定列的column1,column2.
try to use select * instead select column1,column2 of specific columns.


这篇关于填充datagrid惠特查询中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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