Sunday, 2 May 2010

Building Blocks of Data Binding

Stop fumbling around trying to recall the key building blocks of ADO.NET and Dot Net's data binding architecture. Here they are (fresh from System.Data.dll):

1. DataTable
2. DataColumnCollection: defines schema of DataTable
3. DataColumn: building block of schema of DataTable

Adapters create DataTables which are attached to BindingSources that get strapped on to Controls.

Key properties on DataColumn include:

1. ColumnName
2. DataType: e.g. Decimal, Double, Byte, Char, DateTime (or System.Type.GetType ("System.DateTime"))

No comments: