469,929 Members | 1,379 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,929 developers. It's quick & easy.

Unable to cast object of type 'Oracle.DataAccess.Client.OracleComm


I am not sure if this is the right place to post this question. Please let
me know if it is not and I appreciate if someone could point me in the right

I am getting this error after converting to .NET 2.0.
Unable to cast object of type 'Oracle.DataAccess.Client.OracleCommand' to
type 'System.Data.Common.DbCommand'

I am using, Oracle.DataAccess.Client and not Microsoft .NET framework
provided System.Data.OracleClient.

This is the error trace:
[InvalidCastException: Unable to cast object of type
'Oracle.DataAccess.Client.OracleCommand' to type
System.Data.Common.DbDataAdapter.get_SelectCommand () +34
System.Data.Common.DbDataAdapter.FillSchema(DataTa ble dataTable,
SchemaType schemaType) +54

The line in my code where the exception occurs is:
CType(DA, OracleDataAdapter)
where DA is of type: IDbDataAdapter

This code used to work fine with .NET 1.1. After some initial research I
found that "System.Data.Common.DbCommand " is new in .NET 2.0.

Any help would be greatly appreciated.

Jan 12 '06 #1
0 1389

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Pankaj Jain | last post: by
reply views Thread by Fidias Gil de Montes | last post: by
4 posts views Thread by Susan | last post: by
1 post views Thread by Evan M. | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.