Last post Mar 27, 2009 08:00 AM by Wencui Qian - MSFT
Mar 25, 2009 11:52 AM|frankphillips|LINK
I have a stored procedure that returns a recordset gathered from 4 joined tables (ExpectedList, ExpectedListType, Residents, Units), each table is added to the Expectedlist.xsd file as well as the ShowExpectedList(@ExpectedID, @ResidentID) which shows
as a QueriesTableAdapter.
What I'm trying to do is use the QueriesTableAdapter to grab the data and display it in a gridview but I seem to be missing something, not even sure its possible, but considering the wizard allowed (and linked) the tables in the .xsd file, I figure it should
be doable. Just no clue how.
It seems that while it would be more coding, that it would be simpler to forgo all GUI Wizards and strongly typed datasets to just do it using code as I've been doing since v1.1.
Mar 27, 2009 08:00 AM|Wencui Qian - MSFT|LINK
Of course, it's doable. Since you've created the stored procedure in database, you just need to add it in typed dataset, and then a new table class for storing the data and TableAdapter will be generated. Here're the steps:
1) Right click on the designer and select "Add TableAdapter".
2) Select the existing stored procedure.
3) A new table class and TableAdapter will be created.
Then you could fill the table as usual.