Today, I have reviewed MOC of MCSD.Net course 2389 , and get some new taste,Let's participate it:
Today, I have reviewed MOC of MCSD.Net course 2389 , and get some new taste,Let's participate it:
Code example
trans = cnNorthwind.BeginTransaction( _
IsolationLevel.Serializable)
It can set IsolationLevel to Serializable, it's synchronous
=====================
When you fill a DataSet, the DataAdapter enforces constraints such as primary
key uniqueness. To improve performance, set the DataSet property
EnforceConstraints to false before you fill the DataSet. This disables
constraint checking while the data is loaded.
aDataSet.EnforceConstraints = False
===========
The following example creates a DataSet containing a single table named
Customers. The table is filled by using a DataAdapter named daCustomers.
The BeginLoadData method is called to optimize performance.
After the table has been filled, a DataGrid control is bound to the table.
The DataGrid will display the customer information on the screen.
’ Visual Basic
Dim dsCustomers As New DataSet()
dsCustomers.Tables.Add(New DataTable("Customers"))
dsCustomers.Tables(0).BeginLoadData()
daCustomers.Fill(dsCustomers, "Customers")
dsCustomers.Tables(0).EndLoadData()
DataGrid1.DataSource = dsCustomers.Tables(0).DefaultView
// Visual C#
DataSet dsCustomers = new DataSet();
dsCustomers.Tables.Add(new DataTable("Customers"));
dsCustomers.Tables[0].BeginLoadData();
daCustomers.Fill(dsCustomers, "Customers");
dsCustomers.Tables[0].EndLoadData();
dataGrid1.DataSource = dsCustomers.Tables[0].DefaultView;