In my C# application I have a SQL database with a table called Customers. In this table I have several columns like Name, Street, ZipCode and City.
I already managed to get data in and out the database with the use of datasets, tableadaptors and bindingsources and get them into textboxes and listboxes. So far no problem.
But…. the thing I want is to run a SQL query like below and get all the results in a single textbox or listbox. The important things is, that every entry in the textbox or listbox should be on a new line. Multi line for example.
So the result in the textbox should look like:
This is the statement I want to run where @1 is a variable.
SELECT Name, Street, ZipCode, City
WHERE (CustomerID = @1)
I hope someone can point me to the right direction.