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

G

Guest

Hi:

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
direction.

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.DbCommand'.]
System.Data.Common.DbDataAdapter.get_SelectCommand() +34
System.Data.Common.DbDataAdapter.FillSchema(DataTable 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.

Thanks,
Sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top