Dataset Cell operations

Source: Internet
Author: User

1 dataset. Table [0]. Rows [I] [J]

Where I represents the number of I rows, and J represents the number of J Columns

2 dataset. Table [0]. Rows [I]. itemarray [J]

Where I represents the number of I rows, and J represents the number of J Columns

3 dataset. Tables [0]. Columns. Count

Retrieve the total number of columns in a table

4 dataset. Tables [0]. Rows. Count

Retrieve the total number of rows in the table

5 dataset. Tables [0]. Columns [I]. tostring ()

Retrieve the I column name of the table

Note: The calculation of rows and columns starts from 0.

========================================================== ================================

Dataset has taken the value from the database. Currently, dataset has
A B C
1 One
2 two 2
3 three 3
4 four 4

Can I implement the value of C equal to 2 and B?
In SQL, select B from temp_table where c = "2"

For (INT I = 0; I <dataset. Tables [0]. Rows. Count; I ++)
{
If (Dataset. Tables [0]. Rows [I] [2]. tostring (). Equals ("2 "))
{
String value = dataset. Tables [0]. Rows [I] [1]. tostring ();
}
}
The value of value is "two"

From: http://hi.baidu.com/36499861/blog/item/0910fb88cbc27599a5c27204.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.