473,402 Members | 2,055 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,402 software developers and data experts.

Cast Question

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
System.Data.OracleClient.OracleCommand, but everything in the program uses
the Oracle.DataAccess.Client.OracleCommand and I do not want to change things
willy nilly since there are quirks between the two. I know that the newer
versions of Oracle.DataAccess.Client.OracleCommand have the Cancel
capability, but again the different versions of the Oracle ODP can cause
issues that won't be found till it is too late.

Thank you,
Susan

Aug 7 '06 #1
4 1507
Susan,

You can't do this, since they don't share an inheritance tree (as far as
I know). You will have to copy the values over to the new instances, or
change everything in your program to use the type you want.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Susan" <Su***@discussions.microsoft.comwrote in message
news:D3**********************************@microsof t.com...
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
System.Data.OracleClient.OracleCommand, but everything in the program uses
the Oracle.DataAccess.Client.OracleCommand and I do not want to change
things
willy nilly since there are quirks between the two. I know that the newer
versions of Oracle.DataAccess.Client.OracleCommand have the Cancel
capability, but again the different versions of the Oracle ODP can cause
issues that won't be found till it is too late.

Thank you,
Susan

Aug 7 '06 #2
We can't just force Oracle to play nice and at least be backwards compatible?
:)

Thank you. I will try the copy. But if I copy the values of the
OracleCommand that was created, when I cancel the command in the copied
version, will it actually cancel the procedure running on the database?

Thank you,
Susan

"Nicholas Paldino [.NET/C# MVP]" wrote:
Susan,

You can't do this, since they don't share an inheritance tree (as far as
I know). You will have to copy the values over to the new instances, or
change everything in your program to use the type you want.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Susan" <Su***@discussions.microsoft.comwrote in message
news:D3**********************************@microsof t.com...
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
System.Data.OracleClient.OracleCommand, but everything in the program uses
the Oracle.DataAccess.Client.OracleCommand and I do not want to change
things
willy nilly since there are quirks between the two. I know that the newer
versions of Oracle.DataAccess.Client.OracleCommand have the Cancel
capability, but again the different versions of the Oracle ODP can cause
issues that won't be found till it is too late.

Thank you,
Susan


Aug 7 '06 #3
Susan,

I really am not sure, I am only answering from the perspective of what I
know of the class heiarchies (and what C# will allow). I doubt that if you
make a copy of the command and try and cancel it, it will work.

You are probably better off moving to the object model that provides you
with the features you need, and changing your code appropriately.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Susan" <Su***@discussions.microsoft.comwrote in message
news:0C**********************************@microsof t.com...
We can't just force Oracle to play nice and at least be backwards
compatible?
:)

Thank you. I will try the copy. But if I copy the values of the
OracleCommand that was created, when I cancel the command in the copied
version, will it actually cancel the procedure running on the database?

Thank you,
Susan

"Nicholas Paldino [.NET/C# MVP]" wrote:
>Susan,

You can't do this, since they don't share an inheritance tree (as far
as
I know). You will have to copy the values over to the new instances, or
change everything in your program to use the type you want.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Susan" <Su***@discussions.microsoft.comwrote in message
news:D3**********************************@microso ft.com...
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
System.Data.OracleClient.OracleCommand, but everything in the program
uses
the Oracle.DataAccess.Client.OracleCommand and I do not want to change
things
willy nilly since there are quirks between the two. I know that the
newer
versions of Oracle.DataAccess.Client.OracleCommand have the Cancel
capability, but again the different versions of the Oracle ODP can
cause
issues that won't be found till it is too late.

Thank you,
Susan



Aug 7 '06 #4
I've updated to the newest version of the Oracle ODP and the cancel is now
working. I'm just hoping that it doesn't break anything else. Thank you for
your help. :)

Susan

"Nicholas Paldino [.NET/C# MVP]" wrote:
Susan,

I really am not sure, I am only answering from the perspective of what I
know of the class heiarchies (and what C# will allow). I doubt that if you
make a copy of the command and try and cancel it, it will work.

You are probably better off moving to the object model that provides you
with the features you need, and changing your code appropriately.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Susan" <Su***@discussions.microsoft.comwrote in message
news:0C**********************************@microsof t.com...
We can't just force Oracle to play nice and at least be backwards
compatible?
:)

Thank you. I will try the copy. But if I copy the values of the
OracleCommand that was created, when I cancel the command in the copied
version, will it actually cancel the procedure running on the database?

Thank you,
Susan

"Nicholas Paldino [.NET/C# MVP]" wrote:
Susan,

You can't do this, since they don't share an inheritance tree (as far
as
I know). You will have to copy the values over to the new instances, or
change everything in your program to use the type you want.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Susan" <Su***@discussions.microsoft.comwrote in message
news:D3**********************************@microsof t.com...
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
System.Data.OracleClient.OracleCommand, but everything in the program
uses
the Oracle.DataAccess.Client.OracleCommand and I do not want to change
things
willy nilly since there are quirks between the two. I know that the
newer
versions of Oracle.DataAccess.Client.OracleCommand have the Cancel
capability, but again the different versions of the Oracle ODP can
cause
issues that won't be found till it is too late.

Thank you,
Susan



Aug 7 '06 #5

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

Similar topics

4
by: Richard Lee | last post by:
Hi, I have a question when I do a data type cast. the common way when we do a cast, is we know the type we want to cast to, i.e. we want to cast object to string, object xyz = "question";...
15
by: Christopher Benson-Manica | last post by:
If you had an unsigned int that needed to be cast to a const myClass*, would you use const myClass* a=reinterpret_cast<const myClass*>(my_val); or const myClass* a=(const myClass*)myVal; ...
5
by: MC | last post by:
Hi If I have a pointer to a some structure say for example payroll_ptr where struct payroll { ... } has some members and if i use a function argument as int function_process ( (payroll_ptr)...
17
by: Hazz | last post by:
In this sample code of ownerdraw drawmode, why does the '(ComboBox) sender' line of code need to be there in this event handler? Isn't cboFont passed via the managed heap, not the stack, into this...
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
1
by: Reza Nabi | last post by:
Bakground: I have a webform (LoadCtl.aspx) which loads the user control to a placeholder dynamically based on the ctlName querystring passed in the URL. Webform (LoadCtl.aspx) also passes a...
5
by: Frederick Gotham | last post by:
Before I begin, here's a list of assumptions for this particular example: (1) unsigned int has no padding bits, and therefore no invalid bit- patterns or trap representations. (2) All types have...
4
by: dba_222 | last post by:
Dear Experts, Ok, I hate to ask such a seemingly dumb question, but I've already spent far too much time on this. More that I would care to admit. In Sql server, how do I simply change a...
4
by: Pavel Minaev | last post by:
There was an earlier discussion regarding which one is faster - a throwing cast - "(Foo)obj", or a non-throwing one - "obj as Foo", when both are available for a given type and value. The consensus...
2
by: =?Utf-8?B?Unlhbg==?= | last post by:
Hi, How can I get around runtime error that says I can not explicit cast List<SubClassto ICollection<Class>? Generic List inhertis generic ICollection and Subclass inherits Class, then...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.