none
Problem while adding store procedure to dbml class which returns 2 datatable. RRS feed

  • Question

  • hi
    i m adding store procedure to dbml class which returns 2 data table.
    But in dbml's designer.cs file it takes only first datatable fields.
    so is there any way to get 2nd datatable in designer.cs file and display that fields in browser??
    i m using sql server 2008 and vs2008 with linq.
    thanks in advance for the rpl.
    Wednesday, August 19, 2009 12:30 PM

Answers

  • Hi janvi,

    In the designer cs file, you can only get one table since you can’t combine the two table into an array or dataset in the stored procedure.

    Because the IExectuteResutl.ReturnValue’s type is form the designer cs file which is strong typed.

    You change the return type like this: http://msdn.microsoft.com/en-us/library/system.data.linq.imultipleresults.aspx

    And remember to add a class which represents for the other returned table’s structure in the designer cs file.

     

    Best Regards

    Yichun Feng

     

    • Marked as answer by Yichun_Feng Wednesday, August 26, 2009 1:29 AM
    Monday, August 24, 2009 4:58 AM