1. ASP.NET Introduction 2. Comp of .Net Framework 3.5 3. Sys.Req for VS 2008 4. ASP.NET Envrmnt Setup 5. VS2010 Ultimate Sys.Req 6. Installing VS 2010 7. VS 2012 Sys.Req 8. Installing VS Exp 2012 9. Start the VS 2008 10. Application Life Cycle 11. Page Life Cycle 12. Page Life Cycle Events 13. ASP.NET Example 14. Event Handling 15. Default Events 16. Server Side 17. Request Object 18. Response Object 19. Server Controls 20. Server Controls Properties 21. Server Controls Methods 22. HTML Server Controls 23. Client Side 24. ASP.NET Basic Controls 25. TextBox Control 26. CheckBox Controls 27. RadioButton Controls 28. ListBox Control 29. HyperLink Control 30. Image Control 31. BulletedList Control 32. ASP.NET Directives 33. Implements Directive 34. Master Type Directive 35. Page Directive 36. PreviousPage Type 37. Managing State 38. Control State 39. Cookies 40. Query Strings 41. Server-Side State 42. Session State 43. Validation Controls 44. Required FieldValidator 45. Range Validator 46. Compare Validator 47. RegularExpressionValidator 48. Custom Validator 49. Validation Summary 50. Data Source Control 51. AdRotator Control 52. Calendar Control 53. Calendar Control Example 54. Panel Control 55. Panel Control Example 56. Multi Views Control 57. MultiView & View controls 58. MultiView Control Example 59. FileUpload Control 60. FileUpload Control Eg 61. AJAX Control 62. UpdatePanel control 63. UpdateProgress Control 64. Custom Controls 65. Custom Control Eg 66. Personalization 67. Create Simple Profile 68. ADO.NET 69. ADO.NET Objects 70. DataTable 71. DataRow 72. DataColumn 73. Object Example 74. Error Handling 75. Tracing Errors 76. Debugger 77. Security 78. Authentication 79. Authorization 80. LINQ 81. LINQ Query Operators 82. LINQ Example 83. Caching 84. Data Caching 85. Output Caching 86. Object Caching 87. Web Services 88. Create Web Services Eg 89. Web & Machine.config 90. Settings Schema 91. ASP.NET Deployment 92. XCopy Deployment 93. Web Setup Project 94. ASP Interview Part 1 95. ASP Interview Part 2 96. ASP Interview Part 3 97. ASP Interview Part 4 98. ASP Interview Part 5 99. ASP Interview Part 6
Pr.Pg Next Pg

ADO.NET Object The DataColumn tutorials

  • A single DataTable also contains a collection of DataColumns. Whereas rows represent records in a table, the columns represent the attributes of the table.

  • For the example, If a Customers table has a FirstName attribute, a FirstName column within the table will represent this attribute. Every column has a data type associated with it. The FirstName attribute uses a String data type to store the customerís name.

  • A DataTableís column names and their data types can be summarized to form a schema, which is a record describing the format and rules of a table. Column values can also have constraints placed on them.

  • The below table shows the properties of the DataColumn object:





This property Indicates if null values are allowed in this column.


The value of this column is automatically set when a new row is added to the table. Often used for attributes that provides unique numbers, such as a CustomerID.


Specify the column name displayed at the top of a data Displaying control.


Sets the official name of the column used in queries.


Indicates the data type allowed in this column


Provides a default value for this column if needed


Sets the maximum length a column value can be.


Indicates that a column value cannot be changed


Specify the name of the table containing this column.


Indicates that every value in this column must be a unique value within the column, no duplicates


  • The below table shows the methods of the DataColumn object





Allows you to compare the columnís value to another columnís value.


Converts the columnís value to a String data type


Returns the data type of the column



  • Each table has a collection of constraints that define the rules placed on the column values within that table.

  • For example, one column could be restricted to allow only unique values, which would prevent a value from being entered in a column twice. You could also define one of the columns within a table as being the primary key for that table, which is also a data constraint very similar to the unique constraint

  • When you fill a DataSet from a data source of an XML file, all of the constraints from that source will be duplicated within the tables created in your DataSet. Any relationships defined within your DataSet through its Relations collection will be a constraint placed on your data because the value in one tableís column must be a pointer to a unique value in another tableís columns.

  • Each DataSet has a property named EnforceConstraints, which by default is set to True. Developers have the option of disabling all constraints within a DataSet by setting this property to False . This prevents exceptions from being raised whenever defined constraints are violated by data changes within a table. Disabling constraints can be useful for temporary changes that you think may cause exceptions, but you should always try to repair any constraint violations and reenable those checks as soon as possible.


Pr.Pg border                                              Next Pg