Hi, i'm working with a sql (2005) database and using visual studio 2010. I've created a system where one of the forms is a find/search form. A user can enter in for example, a customerID and once they click on "find/search" the customerID will be searched in the database and if found, all relevant information about the customer will be retrieved and displayed in another form (find/search results page). I realise that this can be done using an SQL statement like follows
searchStr = "SELECT * FROM Customer WHERE CustomerID LIKE CIDTextBox.Text%"
What i'm unsure about is how to execute this SQL statement once the "find/search" button has been clicked and how to display the founded results in another form.
I've been wrecking my brain over the past few days on how to do this as i'm new at using vb and sql. Any help on this would be greatly appreciated!
Thanks in advance,