The tableadapter using the stored procedure with the parameter will have methods with additional parameters. Visual Studio will create them automatically when using stored procedures in strongly typed datasets.
For example when you use the stored procedure to return a table of person records selected by age (your stored procedure has 2 parameters MinimumAge and MaximumAge). The generated Fill and GetData methods will have 2 (additional) parameters: MinimumAge as Int32, MaximumAge as Int32. You could call them with the following code:
Dim table as MyDataSet.PersonTable
Dim minimumAge as Int32 = 24
Dim maximumAge as Int32 = 40
Using ta as MyDataSetTableAdapters.PersonTableAdapter = _
new MyDataSetTableAdapters.PersonTableAdapter()
table = ta.GetData(minimumAge, maximumAge)
End Usingl
The same principle will be used when your stored procedure only returns a scalar value or no value at all. For instance when your stored procedure returns the number of persons within a age range, if will generated a method in de QueriesTableAdapter.
Dim minimumAge as Int32 = 24
Dim maximumAge as Int32 = 40
Dim numberOfPersonWithinRage as Int32
Using ta as MyDataSetTableAdapters.QueriesTableAdapter = _
new MyDataSetTableAdapters.QueriesTableAdapter()
numberOfPersonWithinRange = ta.CountPersonsByAge(minimumAge, maximumAge)
End Using
When you use SQL statements with parameters in your strong typed datasets, the same logic will apply.