How to expose a datatable in a strongly typed dataset (without exposing the whole dataset).
-
I have a assembly that contains a class and a strongly typed dataset. I want to expose one datatable as the return datatype on a function - but not expose the whole dataset. For example:
Public Function GetImportSortOrder(ByVal vEffDate As String, _
ByVal vPlant As Integer, _
ByVal vImportID As Integer) As BusinessLogic.DataSet_ImportData.DataTable_ScheduleOrdersDataTableIf I have the dataset modified set to public, the table in question can be seen externally. If I instantiate the datatable, I can create a SO datatable such as: dim o as BusinessLogic.DataSet_ImportData.DataTable_ScheduleOrdersDataTable But all the other datatables in the dataset are also listed. I don't want to show/expose the other datatables. If I go into the dataset.designer.vb file and change the modifier to friend on all other datatables, the modifer is changed back to public when I recompile. How can I accomplish just exposing the one datatable and not all of them? The tableadapters have a "Modifier" property that does just this, but not the datatables themselves. I'm probably overlooking something simple. Thanks for any guidance.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
-
I have a assembly that contains a class and a strongly typed dataset. I want to expose one datatable as the return datatype on a function - but not expose the whole dataset. For example:
Public Function GetImportSortOrder(ByVal vEffDate As String, _
ByVal vPlant As Integer, _
ByVal vImportID As Integer) As BusinessLogic.DataSet_ImportData.DataTable_ScheduleOrdersDataTableIf I have the dataset modified set to public, the table in question can be seen externally. If I instantiate the datatable, I can create a SO datatable such as: dim o as BusinessLogic.DataSet_ImportData.DataTable_ScheduleOrdersDataTable But all the other datatables in the dataset are also listed. I don't want to show/expose the other datatables. If I go into the dataset.designer.vb file and change the modifier to friend on all other datatables, the modifer is changed back to public when I recompile. How can I accomplish just exposing the one datatable and not all of them? The tableadapters have a "Modifier" property that does just this, but not the datatables themselves. I'm probably overlooking something simple. Thanks for any guidance.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison