•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 426,249 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,096 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser: Programming Forums
Views: 7754 | Replies: 23 | Solved
•
•
Join Date: Mar 2008
Posts: 14
Reputation:
Rep Power: 1
Solved Threads: 0
Hi all,
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:
Ramon
Streetname
NewYork
1111AA
This is the statement I want to run where @1 is a variable.
SELECT Name, Street, ZipCode, City
FROM Customers
WHERE (CustomerID = @1)
I hope someone can point me to the right direction.
Cheers,
Ramon.
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:
Ramon
Streetname
NewYork
1111AA
This is the statement I want to run where @1 is a variable.
SELECT Name, Street, ZipCode, City
FROM Customers
WHERE (CustomerID = @1)
I hope someone can point me to the right direction.
Cheers,
Ramon.
•
•
•
•
•
•
•
•
DaniWeb C# Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
access advice ajax asp business code combo cult of the dead cow daniweb data data protection database developer development drive dropdownlist encryption europe forensic forensics government hacker hacking hard hardware help hitachi hp industrial espionage it microsoft module msdn net news office privacy protection reuse search security software sql storage survey terabyte tv vista web wikipedia
- Comboboxes as Lookups in vb6 (Visual Basic 4 / 5 / 6)
- How to search from a database, selecting from a combo or list box in vb? (Visual Basic 4 / 5 / 6)
- Display data in separate controls (SQL) (VB.NET)
- Textbox help (VB.NET)
- An unhandled exception occurred during the execution of the current web request. (ASP.NET)
- Populating & Retrieving Data in a listbox : ASP.NET (w/ VB.NET) (ASP.NET)
Other Threads in the C# Forum
- Previous Thread: how to read a csv file and sort the specific clolumn in descending order
- Next Thread: How to pivot a control from Right Side ?



Threaded Mode