I have tested the dataset new "binary serialize" feature in ADO. net2.0. Except articals said if we set the dataset's property"Remotingformat" as "serializationformat. Binary", it can serializeItself in binary format.
OK, this propety works well, the output file is much smaller than XML style.
But I got something strange:IfI first set a dataset "remotingformat" as "binary" before serialize itInto a file
Define the column field name of the dataset by yourself: Create a class and inherit the dataset class. add custom columns to the dataset in advance. There are two advantages:
1. directly reference: Dataset. table [0]. row [0] [customer. name]; not: Dataset. table [0]. row [
Basic Ideas
The reflection mechanism is used to assign values to each other for the DataTable fields and custom public attributes. NOTE: For the conversion from DataSet to IList
Code Description
/// /// The generic set and DataSet convert each other/// Public class IListDataSet{
/// /// Set for DataSet/// /// /// // HPDV2806Public static
1. How to obtain dataDataReader is the online operation data, and DataReader will always occupy the SqlConnection connection. Other operations during the data acquisition process cannot use SqlConnection to connect to the object.Copy codeThe Code is as follows:While (datareader. read ()){..............}Dataview. datasource = datareader;Dataview. databind ();DataSet is offline operation data. DataSet reads d
This class implements a combination of paging conditions, but only one complete method for passing parameters can be reloaded by yourself.
This class is related to data access and can be used with paging components (see other articles for these two classes)
The stored procedure is attached to the following
Using system;Using system. Data;Using system. collections;Using hkh. database;Using hkh. database. type;
Namespace hkh. Common{/// /// Retrieve data by PAGE/// Public class clspagination{Idbda
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
1. Climate Monitoring Data Set http://cdiac.ornl.gov/ftp/ndp026b
2. Some useful websites for downloading test Datasets
Http://www.cs.toronto.edu /~ Roweis/data.html
Http://www.cs.toronto.edu /~ Roweis/data.html
Http://kdd.ics.uci.edu/summary.task.type.html
Http://www-2.cs.cmu.edu/afs/cs.cmu.edu/project/theo-20/www/data/
Http://www-2.cs.cmu.edu/afs/cs.cmu.edu/project/theo-11/www/wwkb/
Http://www.phys.uni.torun.pl /~ Duch/software.html
You can find the Reuters
Experience in using Crystal Reports 2-use SQL statements to directly generate dataset as the report data source!
The last time I made the method of using oledb to connect to the database directly in the rpt file, but it was not very flexible. This time I used SQL statements to directly generate dataset as the report data source (that is, the push mode ), in this way, you can accept the parameter. Of course,
3
The new data report has been generated. Next, set the data source.Select a report> data source on the toolbar, select the data source to be modified, and rename it, for example, myds.
After the modification is complete, confirm to exit this window.
Select a table in the report designer to display properties. Change the dataset name of the table to the name modified above.
If a report file contains only one data source, the data value in the tab
Dataset objects support ADO. the core object of the net disconnected and distributed data solution, which is widely used. we often need to use the data, such as getting data from a able, copying data from another Abe, or data from datarow. However, only the replication of dataset and datatable supports deep replication, that is to say, the structure of the element can be copied, and the data of the element
DataSet DataSet , the data is cached in client memory and supports a disconnected connection. When the DataGridView control binds to a dataset, it automatically changes the state of the DS's rows, and when doing additions and deletions, it can be done using the SqlCommandBuilder class. SqlCommandBuilder must execute the SELECT command to retrieve the metadata, s
1. Ways to obtain dataDataReader for online operation of data, DataReader will always occupy the SqlConnection connection, in the process of obtaining data other operations can no longer use the SqlConnection connection object.
The code is as follows
Copy Code
while (Datareader.read ()){..............}Dataview.datasource=datareader;Dataview.databind ();
When the dataset is off-line, the
What is the difference between DATASET and DATAREADER? datasetdatareader
The biggest difference between DataReader and DataSet is that DataReader always occupies SqlConnection (commonly known as non-disconnected connections) during use. When you operate a database online, any SqlConnection operation will cause DataReader exceptions. Because DataReader only loads one piece of data in the memory at a time, th
The dataset contains multiple DataTable, and a constraint relationship between the DataTable.
If your data does not need to do relational mapping, it is more efficient to use DataTable directly. If there is a relationship query that needs to be 1:n or n:m, populate the corresponding DataTable in the dataset, and then use the relational query data.
DataSet data
There are many ways in which JSON data can be converted to ado.net datasets, and Newtonsoft.json also provides a converter of the dataset to transform JSON data. But in some cases DataSet converter does not work, and it does not necessarily meet the needs of the project. Here is another simple and efficient way to quickly and easily convert JSON data to ado.net datasets.
Design
In fact, Newtonsoft.json ha
?WSDL")
Set retxml = soapclient.getauthors ()
GetAuthors () Returns a dataset type, which we encapsulate when we start generating WebService:
Dim obj as Bus_authors.authors
Dim rst as ADODB. Recordset
Dim MyDataAdapter as Oledb.oledbdataadapter
Dim Retdataset as DataSet
obj = New bus_authors.authors ()
rst = New ADODB. Recordset ()
MyDataAdapter = New Oledb.oledbdataadapter ()
Retd
Xml XML and. NET are completely integrated, many. NET server controls have one or more capabilities to create XML files, and the DataSet class contains several methods of creating XML files, in which we will create an example of a connection between the dataset and the XML, and the role of this example is to read from the database The data is filled in the DataSet
adapter = new SqlDataAdapter ("SELECT * FROM dbo. Customers ", connection);SqlCommandBuilder builder = new SqlCommandBuilder (adapter);Builder. QuotePrefix = "[";Builder. QuoteSuffix = "]";DataSet custDS = new DataSet ();Connection. Open ();Adapter. Fill (custDS, "Customers");Code to modify data in the DataSet.Without the SqlCommandBuilder, this line would fail.Adapter. Update (custDS, "Customers");Connect
A DataSet is a DataSet, aDataTable is a data table, and a dataset stores multiple DataTable. Datasets and DataTable are like a container for storing data, which can exist when you query the database for some results.The DataSet is powerful for browsing, sorting, searching, filtering, processing hierarchical data, cachi
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.