IBM.Data.DB2.dll on .Net 2.0 framework

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sushi

    IBM.Data.DB2.dll on .Net 2.0 framework

    I have a .Net application that references the IBM.Data.DB2.dl l. The
    version of this dll I have is from UDB 8.1 FixPak3. In my application I
    have some code like below:

    m_Da = new DB2DataAdapter( );
    m_Da.SelectComm and = new DB2Command();
    m_Da.SelectComm and.Connection = connection;
    m_Da.SelectComm and.CommandType = CommandType.Tex t;
    m_Da.SelectComm and.CommandText = "Select * From sourcetb";
    m_Da.SelectComm and.UpdatedRowS ource = UpdateRowSource .Both;
    m_Da.SelectComm and.CommandTime out = 0;

    m_Tb = new DataTable();

    m_Da.FillSchema (m_Tb, SchemaType.Mapp ed);


    When I run this application on the .Net 2.0 framework the FillSchema
    line throws an exception:

    Unable to cast object of type 'IBM.Data.DB2.D B2Command' to type
    'System.Data.Co m
    mon.DbCommand'.
    at System.Data.Com mon.DbDataAdapt er.get_SelectCo mmand()
    at System.Data.Com mon.DbDataAdapt er.FillSchema(D ataTable dataTable,
    SchemaTyp
    e schemaType)


    Is the IBM .Net data provider suported on the .Net 2.0 framework? Does
    a later FixPak fix this issue?

    Thanks
    Sushmitha

Working...