you will have to pass a parameter using out / ref keyword and parameters
As yo are using TableAdapters, you need to select the storedproceedure rather than a query for this operation.
when you select that, it will recognise the parameters itself.
when you call the method over your TableAdapter, which is SelectByName in this case, it is going to be something similar . Modify accordingly
// your TableAdapter
PatientTableAdapter adapter = new PatientTableAdapter();
// your input and output variables
string name = "somePatientName";
int patientID? = 0;
string returnedName? = "";
// TableAdapter Method, wired to Stored Proceedure
adapter.SelectByName("somePatientName", out patientID, out returnedName);
hope this helps
Asad Butt
2010-02-11 10:08:00