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:
00883757
Views:
12
The order that you run your queries in your StoredProc will determine the order of the tables. ADO.Net just picks up what SQL Server or whatever backend brings back in that order.

If your stored proc doesn't change you should have nothing to worry about...

+++ Rick ---


>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)

>
>How can I guarantee that Customers will always be Table and Orders will be Table1?
>
>If I'm counting on the order in which the SQL Statements are executed what's the difference if I just do this?
>
>MyDataSet.Tables[0].TableName = "Customers";
>MyDataSet.Tables[1].TableName = "Orders";
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform