Simple search - confused?!?!


Well-known member
Mar 11, 2005
Midlands, UK
Programming Experience
Hi Guys,

This is a relatively easy question, but I can't for the life of me figure this out and haven't found anything in books or on the net to give me a starter....

I've got a textbox and a button. When the user enters an integer value into the textbox and clicks "Go", I need the form to bring back the matching record with the ID entered into the textbox.

The form also has a datagrid with child rows for that ID, I've created a form and bound the controls, and my SQLSelectCommand1 has parameter;

WHERE CustID = @CustID

then for btnSearch_Click;
SqlSelectCommand1.Parameters("@CustID").Value = CInt(txtCustSearch.Text)

Now, how do I get it to return the value and fill the fields in? I've bound the fields to the dataSet, do I just need to call ExecuteReader or something??

Thanks guys

Top Bottom