error in fill datagrid whit query

Posted by Amir Tavakoli on Stack Overflow See other posts from Stack Overflow or by Amir Tavakoli
Published on 2012-10-13T09:31:39Z Indexed on 2012/10/13 9:37 UTC
Read the original article Hit count: 175

Filed under:
|

i have a data-gride-view and i add my query to this when write my query i catch 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

help me to solve this, tnx

© Stack Overflow or respective owner

Related posts about c#

Related posts about sql-server-2008