Storing Data in Memory in Microsoft ADO.NET 4

  • 10/25/2010

Summary

This chapter discussed the DataRow class, the final destination of all data in ADO.NET. With one instance created per data record, the DataRow class manages each individual columnar field. When used alone, its stored values use the generic Object data type, but when inserted into a DataTable object’s Rows collection, all data type limitations and other constraints established for the table’s columns act together to verify the row’s content.

Beyond these column settings, you can add event handlers to the DataTable that apply custom business rules to the column and row data, providing an additional layer of validation—and ultimately, integrity—for the table’s data.