2005-07-05
| Table of Contents: |
| Rate This Article: | Add This Article To: |
( Page 4 of 4 )
Upgrading Your Typed DataSets
When you upgrade a Visual Studio .NET 2002/2003 project to Visual Studio 2005, your Typed DataSets will migrate seamlessly, for the most part. You should get the same functionality as you had previously. The nature of 1.x Typed DataSets are completely handled in Visual Studio 2005.
Upgrading the project may only be part of the change, though. To make your Typed DataSets behave more like 2.0 Typed DataSets takes a little more work.
TableAdapters
Currently, there is no way to add TableAdapters for migrated DataTables. If you want the TableAdapter style of data access, you have to re-create your Typed DataSets. That's because, when you drag and drop a table onto the Visual Studio 2005 designer, it stores information about the connection and SQL string used to create the TableAdapter and DataTable. Without redoing the work entirely, there is no way to generate that code.
Because this information is missing, when you try to add the TableAdapter to the DataTable, the option is unavailable, as seen in Figure 7:
Upgrading your Typed DataSets does not have to be a harrowing experience. Luckily, Microsoft has taken the tack that it should be as compatible as possible. But they have not gone quite far enough, in my opinion. Hopefully, this article will help to streamline your move from Visual Studio .NET to Visual Studio 2005. Here is a list of the annotations and what they are for. They don't seem to be documented, so be wary of the possibility of changes in the future. In upgraded Typed DataSets, these should be used instead of the older style annotations.
Annotation (all start with 'msprop:')
Valid On
Description
Generator_UserDSName
DataSet
Unknown (no effect detected)
Generator_DataSetName
DataSet
Name of the DataSet class.
Generator_UserTableName
DataTable
Name of the Table accessor on DataSet
typedName
DataTable
Name of accessors that take the singular form. (Older form, use Generator_TableClassName instead.)
Generator_RowClassName
DataTable
Name of the DataRow class for that table
typedPlural
DataTable
Name of accessors that use the plural form
Generator_TableClassName
DataTable
Name of accessors that take the singular form
Generator_TableVarName
DataTable
Name of the variable for a table in the DataSet class
Generator_TablePropName
DataTable
Name of the DataSet property for that table (overrides Plural form)
Generator_RowEvArgName
DataTable
Name of the RowChanged Event Argument Class
Generator_RowEvHandlerName
DataTable
Name of the RowChanged Event Handler class
Generator_UserColumnName
DataColumn
Unknown (no effect detected)
Generator_ColumnVarNameInTable
DataColumn
Name of the local variable in the Table
Generator_ColumnPropNameInRow
DataColumn
Name of the property on the Row
Generator_ColumnPropNameInTable
DataColumn
Name of the Column property on the Table
nullValue
DataColumn
Specifies what is returned if the column is null. Literal value or _null or _empty are valid.
rel_typedChildren
DataRelation
The name of the Method to get children of a Row. (Older form, use rel_Generator_ChildPropName instead.)
rel_typedParent
DataRelation
The name of the property to get the parent of the Row. (Older form, use rel_Generator_ParentPropName instead.)
rel_Generator_ChildPropName
DataRelation
The name of the Method to get children of a Row
rel_Generator_ParentPropName
DataRelation
The name of the property to get the parent of the Row.

>>> More Using Microsoft Visual Studio Articles >>> More By Shawn Wildermuth

