DataReader and DataSet

xiaoxiao2021-03-06  17

In the case of many records (more than 8,000 cases), use DataReader

SqlDataReader Dr = cmd.executeReader (Commandbehavior.CloseConnection);

/ / This representative is automatically closed when the DR is turned off.

While (Dr.Read ())

{

....... Use the loop to bind DR's data to HTMLTABLE.

}

Dr.close ();

This is much faster than DataSet.

转载请注明原文地址:https://www.9cbs.com/read-44933.html

New Post(0)