A little vague, but I guess you mean how to string together a query while a progrm is running?
One way, would be to have some textboxes, such as one for table name, one for which rows to select, and maybe an optional where clause? For select at least.
Then you would have a click event on a control such as a button, when that is pressed, you add the values of the textboxes into a variable.
At the end you could write the result to a textbox or MessageBox.Show("") it.
Any questions, reply
Hope This Helps