473,395 Members | 1,846 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,395 software developers and data experts.

put all rows into a string

I have a column called state with 50 rows as 50 US states. I want to
display the rows as one string like TX, NY, ...

How can I do this easily? Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
2 1076
Take a look at the GetString() function.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"eddie wang" <ew***@kmg.com> wrote in message
news:#U**************@TK2MSFTNGP11.phx.gbl...
I have a column called state with 50 rows as 50 US states. I want to
display the rows as one string like TX, NY, ...

How can I do this easily? Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2
Take a look at the .GetString method of the recordset object. sStates =
rs.GetString(2,,,","), I believe it could be.
http://www.aspfaq.com/2467
http://www.aspfaq.com/5007

Ray at work
"eddie wang" <ew***@kmg.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I have a column called state with 50 rows as 50 US states. I want to
display the rows as one string like TX, NY, ...

How can I do this easily? Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: MrMike | last post by:
Hi. I have a Public Function which requires 2 parameters as follows... Public Function Test(ByVal 1 as String, ByVal 2 as String) Prior to calling this function, I fill a dataset(ds) with an...
0
by: amber | last post by:
Can someone tell me what I may be doing wrong here... I'm trying to remove rows from a table in a dataset that have the same data. My code is pasted below. The 2nd time it runs through the code,...
6
by: dddddddd2444444 | last post by:
Hi,please help... It works fine when I define a 2-D array like char code. But it won't work when I try to define the array dynamically using a function. It just crashes. Does anyone know why?...
2
by: Vagabond Software | last post by:
I'm at a complete loss on this problem. I'm using a DataColumn Expression with the DataTable Select method to return rows matching a data. Rows are returned on my Windows XP Professional computer...
0
by: Ireneus Broncel | last post by:
I have a class which reads Groups and Users from ActiveDirectory. The Problem is, that i have about 10000 rows as product. When I am trying to read the "memberOf" Objects out of this field i get...
5
by: Geoff Jones | last post by:
Hi Suppose we have an array of DataRows e.g. Dim drMyRows() As DataRow = myTable.Rows(0).GetChildRows("PricesCompany") generated via a relationship. The question I have is this. Isn't...
3
by: Niyazi | last post by:
Hi all, I have a dataTable that contains nearly 38400 rows. In the dataTable consist of 3 column. column 1 Name: MUHNO column 2 Name: HESNO Column 3 Name: BALANCE Let me give you some...
0
by: loga123 | last post by:
Hi All, I am very new to .net and trying to develop a small application. I am using asp .net 2.0. I have a table control (server) in my code that has header row like this. <asp:Table...
0
by: rn5a | last post by:
All the rows in a DataGrid are accompanied by a CheckBox. When a user checks the rows & clicks a Button, the checked rows get deleted. For e.g. assume that the DataGrid displays 10 rows. A user...
2
by: Blasting Cap | last post by:
I've got a gridview (that I converted over from a datagrid, which had been working properly), that is doubling up the number of rows returned. When it was running as a datagrid, the same code sent...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.