One. Create a memory table, the code below will use itDataTable auto = new DataTable ();
Auto. Columns.Add ("ID");
Auto. Columns.Add ("Name");
for (int i=1;i
{
Auto. Rows.Add (New Object[]{i, "baibaoqing"});
}
Two. The following methods are commonly
Datatable usage Induction
I. Create a memory table and the following code will use itDatatable auto = new datatable ();Auto. Columns. Add ("ID ");Auto. Columns. Add ("name ");For (INT I = 1; I {Auto. Rows. Add (new object []
In the actual development process, many people may have encountered the same requirements:
You need to obtain different values contained in one or more columns of the datatable to obtain results similar to group by in SQL.
1. The traditional
One of the problems in the project last week was to get the value of a column in the DataTable, since retrieving data from a database is grouped by 2 fields, and the column to be obtained is exactly in the two columns of the grouping, so the value
Http://support.microsoft.com/default.aspx? SCID = KB; en-US; 326176how to: implement a dataset select distinct helper class in Visual C #. netview products that this Article applies.
Article ID
:
326176
Last
The best and fastest way to improve performance is, of course, to improve performance through caching. Any web developer should make good use of caching. The cache mechanism in Asp.net is very powerful. Using the cache mechanism can greatly improve
1. Page Cache
To implement the page output cache, you only need to add an OutputCache command to the page.
CacheProfile
Defines the name of the cache settings associated with this page. Is an optional attribute. The default value is null (""). Note
ado| Objects | data | Optimization There is no doubt that Ado.net provides a powerful, emulated database object model that can store data records in memory. In particular, the DataSet class of ado.net is not only functionally equivalent to the
Ado|xml
There is no doubt that XML and some of its related technologies (including XPath, XSL transformation, and XML schemas) are the foundation of Ado.net. Compared with ADO, the interoperability of the Ado.net object model is greatly improved,
The excel| control note the Visual basic_ version of the download file associated with this article was updated on March 4. If you downloaded the source code before March 4, you will need to download the file again to get the Visual Basic
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.