views:

212

answers:

1

Not sure why I'm getting this error. Project is converted from VS 2005, to VS 2008, but remains with 2.0 framework..

image of the error message

Here is the interface with my generic type and constraint....

 public interface ITableAdapter<DT> where DT:System.Data.DataTable
  {
    /// <summary>
    /// Must be called immediately after instantiation in order to pass objects to TransactionHelper
    /// </summary>
    void InitializeTransactionHelper();
    int Fill(DT pDataTable);
    DT GetData();
    int Update(System.Data.DataRow[] dataRow

Here is the data table as defined by the designer....

        /// <summary>
    ///Represents the strongly named DataTable class.
    ///</summary>
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
    [global::System.Serializable()]
    [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
    public partial class TGSP_STORAGEPOOLDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable {

        private global::System.Data.DataColumn columnSTORAGEPOOLID;

        private global::System.Data.DataColumn columnPOOLCODE;

        private global::System.Data.DataColumn columnPOOLDESC;

So what broke between 2005 and 2008????

Thanks, R

A: 

I found out where this problem was, but the error messaging that is associated with it is totally wierd. As it turns out, I had a partial class defined for the datatable in an another file. I then used the N-tier dataset attribute to move the datatable to another project. (remember this is a conversion). This left a partial class in a project with the other half in another project. When I attempted to recompile - it threw the "implicit conversion error" message.

I'm thinking that this is a pretty interesting bug, and the messaging that is involved with it makes it very hard to understand and correct. I found it only by chance, as I remove the partial class only because it was empty!

I found no other documentation on this problem on the web - so I hope my answer makes sense and helps out somebody else that is pulling out their hair!

codputer