none
the new command text returns data with schema different from the schema of the main query RRS feed

  • Question

  • Hi

    I created a DataSet in my project an put a table from my DataBase into it. then i tried to create new query in DataAdapter section of my table in DataSet. but i got  below message:

    the new command text returns data with schema different from the schema of the main query

    in my new query, only one column selected and also "Group By" used in it. when i am right click on the tabale (in my DataSet) and selecting "Preview Data..." it is working but when i am using this new query for filling a DGV it isn't working!

    Sorry for my bad English!

    Please help me

    Thanks in advance.

    Friday, September 21, 2012 7:59 PM

Answers

  • Hi R.Salehi,

    I guess you are doing something wrong for your data filling method.

    Please check below points.

    • If you are using strongly typed data set, in your solution and dragging any datable on it, all query added on that table should have same schema.
    • you can explicitly add same copy of your datatable with different name in your dataset.
    • you can go for programmed dataset instead of strongly typed

    Thanks and Regards, Shailesh B. Davara

    • Marked as answer by R. Salehi Monday, September 24, 2012 9:18 PM
    Monday, September 24, 2012 5:48 AM

All replies

  • Hi R.Salehi,

    I guess you are doing something wrong for your data filling method.

    Please check below points.

    • If you are using strongly typed data set, in your solution and dragging any datable on it, all query added on that table should have same schema.
    • you can explicitly add same copy of your datatable with different name in your dataset.
    • you can go for programmed dataset instead of strongly typed

    Thanks and Regards, Shailesh B. Davara

    • Marked as answer by R. Salehi Monday, September 24, 2012 9:18 PM
    Monday, September 24, 2012 5:48 AM
  • Hi R.Salehi,

    I guess you are doing something wrong for your data filling method.

    Please check below points.

    • If you are using strongly typed data set, in your solution and dragging any datable on it, all query added on that table should have same schema.
    • you can explicitly add same copy of your datatable with different name in your dataset.
    • you can go for programmed dataset instead of strongly typed

    Thanks and Regards, Shailesh B. Davara

    Thank you so much Shailesh. Unfortunately it's true and i found it too and i don't know why we must have queries exactly in same schema?!

    Regards

    Monday, September 24, 2012 9:18 PM