473,320 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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

sam
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(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.

Thanks,
Sam
Jan 12 '06 #1
0 1547

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

Similar topics

0
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 is exposed to client through remoting on Http...
0
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 ************** System.InvalidCastException: Unable to cast...
1
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 could add that UserControl on Toolbox. However,...
1
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 QueryInterface call on the COM component for the...
2
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 validate(string url, XmlDocument xmlDocument) {...
4
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 use the Cancel functionality available in the...
1
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 curious about is which provider...
14
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 returning a OracleRefCursor and a DataTable, but...
3
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 error today: Unable to cast object of type...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.