472,338 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,338 software developers and data experts.

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 1476

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Pankaj Jain | last post by:
Hi All, I have a class A which is derived from ServicesComponent to participate in automatic transaction with falg Transaction.Required. Class A...
by: Fidias Gil de Montes | last post by:
In a Distributed Windows application, I receive the following message when the client calls the server: ************** Exception Text...
by: hrhoe | last post by:
Hi, I'm trying to create a reusable component with C#. So, I created a user control that uses Microsoft SQLDMO Object Library (SQLDMO). And I...
by: mminto | last post by:
Unable to cast COM object of type 'System.__ComObject' to interface type 'Manage.Statistics.IManageStats'. This operation failed because the...
by: John Smith | last post by:
I'm writing webervice client using .Net 2.0. I have this class: public class MyWebService : SoapHttpClientProtocol { public XmlDocument...
by: Susan | last post by:
Does anyone know how to cast or convert a Oracle.DataAccess.Client.OracleCommand to System.Data.OracleClient.OracleCommand? Basically, I want to...
by: Evan M. | last post by:
Hello, I'm creating a web app that needs to provide some simple, read-only access to an Oracle database using SELECT statements. What I am...
by: jehugaleahsa | last post by:
Hello: I am working with Oracle .NET Stored Procedures. I would like to know how to return the results of a SELECT statement. I have tried...
by: mbewers1 | last post by:
Hi there, This method was definitely working for me yesterday and I can't seem to find out what I've changed that makes it return the following...
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.