Data Developer Center > Data Platform Development Forums > ADO.NET Managed Providers > The schema returned by the new query differs from the base query error

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

  • Thursday, October 26, 2006 5:26 PM
     
     

     

    Hi guys m working with vs2005 and SQL2005,

    When i try to add a query to my table adapter its saying: The schema returned by the new query differs from the base query

    And m building the query in the query builder and it says its correct , but when i want to add the query m getting the error here's the query:

    SELECT     Bestellingen.Totaalprijs, BestellingInhoud.Aantal, BestellingInhoud.Prijs_per_stuk,
                          BestellingInhoud.Aantal * BestellingInhoud.Prijs_per_stuk AS Expr1
    FROM         Bestellingen INNER JOIN
                          BestellingInhoud ON Bestellingen.BestellingID = BestellingInhoud.BestellingID

    I hope somebody has any solution m getting sick of that error

     

Answers

  • Friday, October 27, 2006 11:48 AM
     
     Answered
    Hi

    The reason is that the field don't match with the original fields.
    Every "select" statement should have the same output fields.

    So you will not be able to use this query to fill a datagrid etc., But you will be able to use the query within your code.

    To solve this problem, make a new datatable by dropping the query onto the dataset.  Or put the query in a "stand alone" tableadapter (also called a QueriesAdaptor)

    hope this helps.
    Kind regards (Met vriendelijke groeten)