473,394 Members | 1,742 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,394 software developers and data experts.

Equals-Operator on RAW Columns

Hi there,

I try to execute a DB-Update using
ADO.NET CommandBuilder (MSORA Data Provider) on Oracle 8.1.6
(unfortunately, ODP.NET seems to require Oracle 9i or above). One of
ADO.NET's
DataTable columns is of type Byte-Array, and refers to a RAW column
on the Oracle-DB. The CommandBuilder generates Update-Statements of
this kind:

Update table set col = :col_new_value where col = :col_old_value;

Ok, the parameters are actually called p0...pn. The problem is that
the Byte-Array will be expanded to an expression like
'0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f', so the statement will expand to:

Update table set col = 'ffffffffffffffffffffffffffffffff' where col =
'0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f';

The old RAW-value in the database is
'0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F'. But the update fails due to
missing capitalization - the equals-operator only seems to work on
capitalized hex values.

This one would work fine:

Update table set col = 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'
where col = '0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F';

Due to the nature of ADO.NET CommandBuilder I cannot really influence
the way it generates its Update-statements. I cannot hardcode SQL
either (e.g. using HEXTORAW), as this legacy application is
continuously based on CommandBuilders.

Any ideas how to circumvent this behaviour? Is there a way to convince
Oracle to accept lowercase hex strings on equals comparisons as well?

Thanks a lot in advance!

Kind regards,
Arno Huetter
Jul 19 '05 #1
0 2858

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

Similar topics

17
by: Zeng | last post by:
I'm trying to comparing 2 objects (pointer to object) to see if they are the "same" as each other. Here is what the definition of being the "same" object type for both objects, object 1, ...
3
by: Frank Wisniewski | last post by:
Is this suppose to work like this: I have a class called foo in which I tried to override equals and return different answers based on what was passed in. public class foo { private string...
12
by: Rubbrecht Philippe | last post by:
Hi there, According to documentation I read the ArrayList.IndexOf method uses the Object.Equals method to loop through the items in its list and locate the first index of an item that returns...
18
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the...
8
by: Kenneth Baltrinic | last post by:
When one overrides the Equals() method of an object, one is supposed to override GetHashCode() as well and this makes good sense. But I have seen lots of people who do this and do not override the...
1
by: Omiris | last post by:
I'm trying to use the Equals() method that is defined on the List(Of T) class. The docs seem to state that if T implements the IEquatable interface, then it will use the Equals method that is...
5
by: taumuon | last post by:
I've got an object, Person, that supports IEquatable<Person>. It implements bool Equals(Person obj) as well as overriding bool Equals(object obj) I've got a container type that holds a member...
17
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post by:
What is the difference of == and Object.Equals() If I want to query werther to pointers are pointing to same instance, do I use == or Objects.Equals? foo a,b; if ( a == b ) ... or if...
7
by: =?Utf-8?B?QWxleCBDb2hu?= | last post by:
In C++, there is an easy technique to provide an overloaded Equals() method. A straightforward translation to C# causes a stack overflow. Why does b.Equals(ba) in the snippet below not understand...
3
by: odwrotnie | last post by:
Hi, I have a class Range with 2 fields (starts and ends), it overrides equals() method: public boolean equals(Object o) { if(this == o) return true; if(o == null) return false;...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.