473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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:

email0@address.com, email1@address.com, email2@address.com, 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
2 1546
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:
http://www.programmersheaven.com/2/F...ng-Data-Reader

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
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

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

Similar topics

1
by: TimG | last post by:
12.) Now you have two different tables - each with two columns. Table #1 Single Column 2 rows with a value equal to 1 and 2
3
by: Brett P. | last post by:
Hello, I am trying to have only one column sortable within a data grid. I know you set the allow sorting property to true on the style, but this enables sorting for all columns. Is there a way...
0
by: gerry | last post by:
I want to populating an asp list box from a simple access lookup list (single column not a table.)I don't want to create tables just for lookups as the values will be descriptive only and will...
3
by: veg_all | last post by:
Is there a way to select a single column from a mysql database and directly put the results into an arrray? Here is the workaround below, but I would like to elimniate the array_push step: ...
1
by: Sonny | last post by:
Hi, Would like to know the performance differenece between Multi-column Index vs Single Column Indexes. Let's say I have a table with col1, col2, col3 along with a primary key column and...
1
by: san1014 | last post by:
Hi I have a table SQL> select * from nodes; NODE_ID NODE_NAME -------------------- ------------------------------ N1 Kothhapet N2 Nagole...
7
by: ssknov | last post by:
hi i need to populate a DatagridView1 with a single column values of a table. I tried like this. Dataset ds=new dataset(); my dataset ds retrieves and filles a single column from a table. ...
25
by: Darsin | last post by:
Hi all I need to perform a summation on a column of a table based on a criteria given in another column in the same table. The catch is i need to perform different sums according to the number of...
3
by: santoshjsh | last post by:
hello everyone, i have a gridview in which i have multiple checkboxes in a single column. means for every row in the gridview i have four checkboxes in one column e.g Add, Delete, Print,...
4
by: luciegiles | last post by:
Hi, I wish to transpose data in an Access table currently in a single column over many rows to many columns over single row: Current format: CHI DateIssued 123456 01/01/10...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.