|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Modifier for QueriesTableAdapterI can find the modifier for a TableAdapter - so I can make it Friend - but I
can't see the same for a QueriesTableAdapter. Am I missing something? Hi Richard,
What do you mean by QueriesTableAdapter? Is it an instance of TableAdapter? If so, just click on it and change the modifier property in the properties window. Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights." When you use the designer to edit a dataset, you can drag a "Query" from the
toolbox and this creates something named (by default) "QueriesTableAdapter". The Properties windows describes this (in the pull down list) as QueriesTableAdapter (in bold) followed by QueriesTableAdapter (in non-bold). Generally the bold is the name of the object and the non-bold is its type. Clearly this is not always the case because if I change the name of my QueriesTableAdapter both the bold and non-bold text changes! The class behind this graphical widget makes it obvious what it is - its a class that contains a collection of sql command objects and, for each command object, exposes a public method that calls the said sql command. It inherits from System.ComponentModel.Component. My question remains however, how can stop it being exposed publically. I can do so the for the analagious TableAdapter (which is similar to the QueriesTableAdapter except it is associated with a DataSet and includes methods for filling and returing the dataset as well) but I can't see a way of doing so for the QueriesTableAdapter? Show quoteHide quote "Kevin Yu [MSFT]" wrote: > Hi Richard, > > What do you mean by QueriesTableAdapter? Is it an instance of TableAdapter? > > If so, just click on it and change the modifier property in the properties > window. > > Kevin Yu > ======= > "This posting is provided "AS IS" with no warranties, and confers no > rights." > > Hi Richard,
Thanks for your clarify. As far as I know, the modifier of queriesDataAdapter class itself cannot be modified. This feature is by design. You can try to modify the modifier property of the query method. Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights." Yes, the modifier for each individual query can be changed, and this
obviously prevents the associated method from being called. However, being unable to hide the queriesDataAdapter class itself is a real pain because it clutters the assemblies public interface with unneccessary namespaces and unneccessary classes - in a large project there might be many hunderds these. Is it possible to have this requirement added to a wish list for the next version? Show quoteHide quote "Kevin Yu [MSFT]" wrote: > Hi Richard, > > Thanks for your clarify. As far as I know, the modifier of > queriesDataAdapter class itself cannot be modified. This feature is by > design. You can try to modify the modifier property of the query method. > > Kevin Yu > ======= > "This posting is provided "AS IS" with no warranties, and confers no > rights." > >
Other interesting topics
Update Command Question
TableAdapter's TableMappings? Basic question about datasets TableAdapter and Identity Column Values after INSERT help with async = true scenario SQLServer: query by form Displaying SQL Image data type information Updating tables -- what am I missing? Finding Instances of SQL Server for DropDownList Change color by line based on row column value in asp:DataGrid? |
|||||||||||||||||||||||