f



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

I have a .Net application that references the IBM.Data.DB2.dll. 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.SelectCommand = new DB2Command();
        m_Da.SelectCommand.Connection = connection;
        m_Da.SelectCommand.CommandType = CommandType.Text;
        m_Da.SelectCommand.CommandText = "Select * From sourcetb";
        m_Da.SelectCommand.UpdatedRowSource = UpdateRowSource.Both;
        m_Da.SelectCommand.CommandTimeout = 0;

        m_Tb = new DataTable();

        m_Da.FillSchema(m_Tb, SchemaType.Mapped);


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.DB2Command' to type
'System.Data.Com
mon.DbCommand'.
   at System.Data.Common.DbDataAdapter.get_SelectCommand()
   at System.Data.Common.DbDataAdapter.FillSchema(DataTable 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

0
Sushi
9/14/2005 11:32:55 PM
comp.databases.ibm-db2 12448 articles. 3 followers. arunrocks (9) is leader. Post Follow

0 Replies
517 Views

Similar Articles

[PageSpeed] 10

Reply: