none
Typed DataSet went crazy RRS feed

  • Question

  • hi guys,

    i have a typed dataset i use to load data from access DB.

    i have data adapters in this DS, the default ones, which i use to load the data.

    it worked greate, i use Where<> method on some of the tables in my application, like hits:

    myDS.Table1.Where<

    TypeDS.Table1Row>(x => x.ID == ID.ToString()).FirstOrDefault();

    i've changed one of the column names in the data set, and suddenly i get this error message:

    'instance argument: cannot convert from 'myNameSpace.TypeDS.Table1DataTable' to 'System.Linq.IQeuryable<myNameSpace.TypeDS.Table1Row>'

    i look in my table properties and the intelisence doesn't show that i even have the Where<> method.

    i haven't got a clue where to even begin with this error, plz plz plz help.

    thanks

    Wednesday, December 15, 2010 2:24 PM

Answers

  • I'm sorry Jackie, but I don't really see how those links you provided have anything to do with the OP's problem.

    Mircaddict ... something doesn't look quite right between what your original code was and the error message you're getting. Are you sure you didn't change that original LINQ query? As you posted it, it certainly is returning Table1Row, not Table1DataTable as the error seems to indicate(and I'm assuming that it's that line that's giving you the compiler error). Are you sure that the Typed DataSet got re-generated after you added an additional column? (that's grasping at straws though ... you'd have other errors if it didn't get re-generated). 


    ~~Bonnie Berent [C# MVP]

    geek-goddess-bonnie.blogspot.com
    Sunday, December 26, 2010 1:18 AM

All replies