Hello,
How can I declare an array, and set it to equal all the items in a column of
a dataset?
TIA,
Amber 4 1478
Amber,
A dataset has no column, what do you mean?
Cor
I assume you want to copy the rows from a table in the DataSet, right? If
so, you need to manually loop through the rows and copy across to the array.
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF http://www.apress.com/book/bookDisplay.html?bID=105
Communities - http://community.integratedsolutions.dk
"amber" <am***@discussions.microsoft.com> wrote in message
news:39**********************************@microsof t.com... Hello,
How can I declare an array, and set it to equal all the items in a column of a dataset?
TIA,
Amber
can you explain how to do that?
"CT" wrote: I assume you want to copy the rows from a table in the DataSet, right? If so, you need to manually loop through the rows and copy across to the array.
-- Carsten Thomsen Enterprise Development with VS .NET, UML, AND MSF http://www.apress.com/book/bookDisplay.html?bID=105 Communities - http://community.integratedsolutions.dk
"amber" <am***@discussions.microsoft.com> wrote in message news:39**********************************@microsof t.com... Hello,
How can I declare an array, and set it to equal all the items in a column of a dataset?
TIA,
Amber
Here's one way:
' Populate dataset
SqlDataAdapter1.Fill(dataset1, "Categories")
' Create and dimension row array
Dim rows(dataset1.Tables("Categories").Rows.Count) As DataRow
' Loop through all rows in Categories table
For i As Integer = 0 To dataset1.Tables("Categories").Rows.Count - 1
rows(i) = dataset1.Tables("Categories").Rows(i)
Next
--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
"Cath" <Ca**@discussions.microsoft.com> wrote in message
news:6C**********************************@microsof t.com... can you explain how to do that?
"CT" wrote:
I assume you want to copy the rows from a table in the DataSet, right? If so, you need to manually loop through the rows and copy across to the array.
-- Carsten Thomsen Enterprise Development with VS .NET, UML, AND MSF http://www.apress.com/book/bookDisplay.html?bID=105 Communities - http://community.integratedsolutions.dk
"amber" <am***@discussions.microsoft.com> wrote in message news:39**********************************@microsof t.com... > Hello, > > How can I declare an array, and set it to equal all the items in a > column > of > a dataset? > > TIA, > > Amber This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kaneda |
last post by:
Hello everyone!
I have some weird(?) problems, and I am not quite sure if there are due to
my errors or maybe a limitation in the .Net framework.
I have a ComboBox I need to fill with the...
|
by: Cybertof |
last post by:
Hello,
Is it necessary to initially fill a dataset to be able to add a new row
to the dataset and then update the undercover database ?
(In the case of a very large database, this would mean...
|
by: Krzysztof Karnicki |
last post by:
I have such a problem… I have create my custom DataGridColumn inheriting from
System.Windows.Forms.DataGridColumnStyle on using it on DataGrid, to show
rows painted by me self. Because dates ...
|
by: crjunk |
last post by:
I have a 3 table in my DataSet that I'm filling with data. After I've
filled these 3 tables, I'm then trying to run a query that will fill a
4th table in the DataSet with data from the three...
|
by: amber |
last post by:
Hello,
How can I declare an array, and set it to equal all the items in a column of
a dataset?
TIA,
Amber
|
by: gillcleeren |
last post by:
I have a datagrid that has to be filled in a WinForms application. The
data comes from an Oracle database.
The normal procedure would be filling a dataset, but I have the problem
that there are...
|
by: Derek Vincent |
last post by:
Why am I having problems filling my dataset when I select fields of type
varchar(350) from interbase? I can fill the dataset when I select every
other field in the table but I receive and error...
|
by: WayneM |
last post by:
I have compact framework app that I was trying to test out on a windows form,
but I cannot get past the very first step of simply filling a DataGrid from a
DataSet. My code is
Dim sqlStmt As...
|
by: Sid Price |
last post by:
I have Dataset that I need to filter into another Dataset for display and I
can not find out how to do this. I have found methods for copying a Dataset
but I can not see how to filter the rows...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |