Today, I have reviewed MOC of MCSD.Net course 2389 , and get some new taste,Let's participate it:

it2024-08-11  60

Today, I have reviewed MOC of MCSD.Net course 2389 , and get some new taste,Let's participate it:

Code exampletrans = cnNorthwind.BeginTransaction( _IsolationLevel.Serializable)

It can set IsolationLevel to Serializable, it's synchronous

=====================When you fill a DataSet, the DataAdapter enforces constraints such as primarykey uniqueness. To improve performance, set the DataSet propertyEnforceConstraints to false before you fill the DataSet. This disablesconstraint checking while the data is loaded.aDataSet.EnforceConstraints = False===========The following example creates a DataSet containing a single table namedCustomers. 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 BasicDim 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;

转载于:https://www.cnblogs.com/redbb/archive/2004/01/31/628.html

最新回复(0)