none
‘The schema returned by the query differs from the base query‘ RRS feed

  • Question

  • I am using C# Express to query data from SQL Server Express.  I have an original query that looks like this:

    SELECT OrderID, ProductID, ProductName, UnitPrice, Quantity, Discount, ExtendedPrice

    FROM dbo.[Order Details Extended]

     

    In selected ‘data source table’, I have ‘NorthwindDataSet.Order Details Extended’ and in ‘New query’ name, I have ‘FillBy’

     

    I modified the query slightly to look like this:

    SELECT DISTINCT ProductName

    FROM            [Order Details Extended]

    ORDER BY ProductName

     

    When I hit ‘OK’, I get an annoying message that reads ‘The schema returned by the query differs from the base query’.  Well, that’s what I want.  So, why won’t C# just make the change and display the results?  It keeps going back to my old query, which is NOT what I want, and it won’t let me save my new query.

     

    When I go to ‘Query Builder’ and ‘Execute Query’, everything works fine.  What am I doing wrong here?

     

     

     

    • Moved by Andrew.Wu Wednesday, August 17, 2011 9:50 AM (From:Visual C# Express Edition)
    Monday, August 15, 2011 12:58 AM

Answers

  • Hello,

    Thanks for you post.

    Regarding your description, it looks that you have binded your data to your control. If I misunderstood, please feel free to elebarote your question kindly. When you try to run SQL command, it actually creates a schema different from the schema of the DataTable or others. It looks it mismatches in schema.

    In addition, please provide more detailed information about your project if you have any questions.

    Please feel free to let us know how it goes.

    Thanks,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, August 18, 2011 10:49 AM

All replies

  • Hi ryguy72,

    Since this issue is more related with Data Platform, I'm going to help move your post to the ADO.NET DataSet Forum for more efficient response.

    Thanks for your understanding.

    Best Regards,


    Andrew Wu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, August 17, 2011 9:49 AM
  • Hello,

    Thanks for you post.

    Regarding your description, it looks that you have binded your data to your control. If I misunderstood, please feel free to elebarote your question kindly. When you try to run SQL command, it actually creates a schema different from the schema of the DataTable or others. It looks it mismatches in schema.

    In addition, please provide more detailed information about your project if you have any questions.

    Please feel free to let us know how it goes.

    Thanks,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, August 18, 2011 10:49 AM