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

Hello,

I have been trying to create search queries:

1) Click on the xxxTableAdaper.

2) Choose a table

3) Name the FillBy field

4) Type in the SELECT fieldname FROM table WHERE field=@key

5) Click OK.

Then always I get "The schema returned by the new query differs from the base query" error. Something is fundamentally wrong Any idea

Thank you.

Athena



Answer this question

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

  • Nugget

    Thank you all,

    I was connecting to Northwind. I guess you are right that if I try to SELECT only some fields instead of all the fields, it does not work. I know what I need to do. Thank you very much.

    Athena


  • Draggi

    I continue receiving the same error, despite SELECTing just one field :-(

  • Bob Black

    Which database are you connecting

  • BarryIOS

    The problem here is newbies like myself are trying to use the query builder to display only certain columns. We have been led to believe that this will work since it works in the Exicute Query button in the query builder. The better way of not displaying columns it to set their visible property to false. You do this after the grid control is created in the form. Right click on the grid, then choose edit column. Select the column and make visible false.


  • sgaap

    I'll be moving this to the ".NET Framework Data Access and Storage" Forum as that one has a better chance to provide an answer.

    I suspect your problem is that your query does not return data of the same schema as the TableAdapter's data table, e.g. "SELECT * ..." instaed of "SELECT fieldname ... " would work.



  • Madhu Sudhan

    We may be newbies, but the concept of using a query builder to pull single values out of a database comes from the documentation:

    ms-help://MS.VSExpressCC.v80/MS.NETFramework.v20.en/dv_raddata/html/ecf8c262-58ca-4a69-a82c-916c0c061422.htm

    I've stumbled into this thread as I try to figure out how to pull values out of my table as a prerequisite to manipulating the dataa in complex ways. Supressing the display of certain rows or columns is not helpful.


  • "The schema returned by the new query differs from the base query" error