UdtTypeName in strongly typed dataset in dataset designer RRS feed

  • Question

  • I created a strongly typed DataSet (using dataset designer) with columns containing a SQL 2005 UDT. I'm able to select into a DataTable, and retrieve the UDT value from the column. On updating, however, I receive an error message:


    UdtTypeName property must be set for UDT parameters.


    In the Update parameters collection in the datatable's table adapter, there is no property available for UdtTypeName, although it is a valid property of the SqlParameter class. I tried to add the property directly into the XML for the typed dataset, but it did not recognize it as a valid attribute. The only way I could set this parameter and get the update to work was through code, e.g.:


    ta.Adapter.UpdateCommand.Parameters["@Name"].UdtTypeName = "Name";


    Why is this property missing from the properties collection in the dataset designer, and thus not able to be set declaratively? Is it an oversight? This is an awkward way to assign this property, since I now have to deal with both declarative and programmatic assignments for every UDT field.
    Tuesday, December 4, 2007 3:40 AM

All replies

  • Getting the same problem with VS2010 and SQL 2008R2 trying to add an SP that takes a table parameter.
    Thursday, May 26, 2011 5:24 PM