By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,466 Members | 1,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,466 IT Pros & Developers. It's quick & easy.

Querying a single column and displaying all results in a single textbox

P: 3
I am trying to make a list, separated by a comma, of entries from a single column in a SQL database. I have been spending the last several days searching for a way to do this, but every thing I found either didn't work, or wasn't exactly what I was looking for.

The query will pull all the email address that are not null. I already know how to do the query, so I do not need help with that. What I need to know is how to take the result of that query and make it look like this:,,, etc, etc, ...

I feel like I should know this, but for the life of me, I can't remember nor can I find it in any of the textbooks I have.

I am using Visual Basic 2010 and SQL Server 2005. I also have access to Visual Basic 2005 if needed.

Any help would be appreciated. Thank you.
Sep 5 '10 #1
Share this Question
Share on Google+
2 Replies

P: 3
A quick update. I think I have found what I am looking for. However, I am having issues with the code. Here is the code that I am using:

The part that I am troubles with is:
1. What do I use for the server name, and where do I find it? Like I said above, I am using SQL Server 2005.

2. What about logging in if I use Windows Authentication?
Sep 5 '10 #2

P: 3
Alright, this is kind of turning into a self help thread, sorry about that. I have figured out the previous questions. Now I have some new issues.

I am using a MDI Parent form to call multiple windows. One form is to display the query from above. The second form displays the data in either a datagrid, or detail view. However, when I open the second form, close it, then open the first form and run the query, I get an error saying that I cannot login to the server. And when I open the first form and run the query, close it, then open the second form, none of my data appears. How do I fix this?
Sep 5 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.