Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting TableNames from Stored Proc
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00882930
Message ID:
00883275
Views:
7
Bonnie,

It's one of those hidden gems!!

>Kewl, Cathi ... I didn't know you could do that. Sorry that I steered Victor in the wrong direction. =( Next time I'll know better. ;)
>
>~~Bonnie
>
>>Hi Victor,
>>
>>Use the DataAdapter's TableMappings collection to control the names of the DataTables that the DataAdapter will fill or create. So, if your stored procedure will return customer and order information, you would use code like the following:
>>
>>MyDataAdapter.TableMappings.Add("Table", "Customers")
>>MyDataAdapter.TableMappings.Add("Table1", "Orders")
>>MyDataAdapter.Fill(MyDataSet)
>>
>>
>>>Thanks, Bonnie - I figured that would be the case but I thought I'd throw it out there in case someone had found a nifty way of doing this other than Typed Datasets.
>>>
>>>I appreciate the help...
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform