SqlConnection database Connection object: Only joins for other operations SqlDataAdapter data adapter object, which is to execute a query statement (SELECT statement) with a certain SqlConnection, and put it in a dataset SqlCommand data Command object (select,insert,delete,update, etc.) sqlcommand.parameter attribute pass SQL parameter executescalar: Executes the query, returns a single field, For example, the sum of the results, average, the maximum
Released on: 1/14/2005 | updated on: 1/14/2005
David burgett
This document assumes that you are familiar with ADO. NET and Visual Basic. net.
Summary
Many technologies provided by ADO. Net can improve the performance of medium-sized dataset applications and make it easier to build such applications. Dataset is a flag of the ADO. Net object model and can be used as a small, disconnected copy of the data sou
DataSetRepresents the cache of data in memory.
PropertyTables gets a collection of tables that are contained in the DataSet.
Ds. tables["SJXX"]
DataTable
Represents a table of data in memory.
Public propertiesColumns gets the collection of columns that belong to the table.
The dataset obtains the dataset to which this table belongs.
DefaultView gets a cu
XML this time to write the project every time to use XML to save some configuration, and each operation of XML is very cumbersome, no database so smooth. It was later discovered that using a dataset to manipulate XML was convenient and flexible, so it wrote a class that manipulated XML to deal with general XML operations (source download attachments).
1 Basic IdeasIn fact, using dataset to manipulate XML, i
Check for changes with the HasChanges method.
First use the HasChanges method to detect the affected rows (return bool)
if (!mydataset.haschanges (datarowstate.modified)) return;
To create a temporary dataset
DataSet Xdataset;
Using the GetChanges method of the dataset to get the affected rows
Xdataset = Mydataset.getchanges (datarowstate.modified);
detecting
xml| Original
This time the project writes each time to use the XML to save some configuration, but each operation XML is very troublesome, does not have the database so conveniently. It was later discovered that using a dataset to manipulate XML was convenient and flexible, so it wrote a class that manipulated XML to deal with general XML operations (source download attachments).
1 Basic IdeasIn fact, using datas
field {get;set;} Do not write the display does not come out//foreach (DataRow datarow in DataTable.Rows)// {
//Console.WriteLine (datarow["id"]+ "" +datarow[1]); // //encapsulate each row of data into the City class//mycitylist. ADD (new cities () {//Id=int. Parse (datarow["id"). ToString ()),//Cityid=int. Parse (datarow["Cityid"). ToString ()),//city=datarow["City"]. ToString (),//Provinceid = Int. Parse (datarow["Provinceid"). ToString ())// }); // }
Although Ado.net is a successor to the. NET platform, the difference between the two is great. DataSet objects in the Recordset objects and ado.net that are highlighted in ADO. The recordset is also a very flexible object, Microsoft launched it also painstaking, such as: The Recordset can be offline operation of the database tutorial, good performance, high efficiency, etc. these all let the then programmer spirits. Although the recordset is already c
Dataset is a method used to connect to SQL. It means to store copies of the database in applications.ProgramWhen the application starts running, save the database-related data to dataset.Datatable indicates a table with data in memory. You can use view to obtain a custom view of a table that may include a filtering view or a cursor position.The datareader object is the simplest way to read the database. It can only read, cannot write, and is read from
and Repeater canDatalist1.datasource =Pds; Datalist1.databind ();}1. Create a DataSet object:DataSet ds = new DataSet ("DatasetName");2. View the structure created by calling Sqldataadapter.fillDa. Fill (ds, "Orders");DataTable tbl = ds. TABLE[0];foreach (DataColumn col in tbl. Columns)Console.WriteLine (Col. ColumnName);3. View the data returned by SqlDataAdapter①, DataRow objectDataTable tbl = ds. TABLE[
Dataset indicates a dataset, which is cached in memory. Can contain multiple tablesDatset is non-connection-oriented when connecting to the database. Read all tables to the SQL Buffer Pool and disconnect from the database.
Datareader is connected to the database. When reading a table, you can only read the table forward. After reading the data, the user decides whether to disconnect the table.
The data in t
This article introduces the detailed description of dataset in javascript, including the basic usage of dataset, the role of dataset, and basic operations of dataset, if you are interested in javascriptdataset, let's learn it. DataSet is ADO. NET.
Tags: Report set computing report script Dataset
A new dataset type, script dataset, is provided for computing reports. This allows you to further compute and process data in a dataset to provide data source support for reports. The following describes the script dataset.What is a script
Disadvantages of weak Dataset:
Whenever the retrieved value from dataset is returned as an object, type conversion is required;
When used by other developers, they cannot know which columns are available;
You can only know the names of all columns at runtime, so it is difficult to bind data.
Therefore, vs provides us with the automatic generation function of a strongly
Create a strong dataset as the data source of irdview. a column in the dview is the datagridviewcheckboxcolumn deletion column. After selecting the dataset, click the delete button. To compare the dataset, you must reload the data source and load the strong dataset. However, all the selected data items in the datagridv
I. Use sqldataadapter. Update (Dataset DS) to update the database.1. When dbdataadapter calls the update method, dataadapter analyzes the changes and runs the corresponding commands (insert, update, or delete ). When dataadapter encounters a change to datarow, it uses insertcommand, updatecommand, or deletecommand to handle the change. In this way, you can try to improve the ADO. NET application by specifying the command syntax at design and using sto
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.