I'm currently trying to create a query through Visual Studio C# that will select all records for a CustomerID when someone using the form enters a customer ID in a textbox, and then display those records in textboxes on the form. How can I go about achieving this? I know very very little about SQL or how to make these two languages work together. I have already created the database and created a data source in visual studio with it. I believe my query should look something like
SELECT CustomerID, Name, Address, City, State, ZipCode, Phone, Email
FROM Customers
WHERE (CustomerID = @Param1)
However, I don't really know what @Param1 should actually be called since it's coming from a textbox. How should this query read? Am I even on the right track?
Second question is once I get this data selected, how do I make each piece of selected data populate a textbox on my form?
Sorry for the newbie questions, this is my first time really doing anything with SQL.
Thanks for any help.