469,088 Members | 1,265 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,088 developers. It's quick & easy.

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
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 =

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:

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 2706

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

17 posts views Thread by Zeng | last post: by
3 posts views Thread by Frank Wisniewski | last post: by
8 posts views Thread by Kenneth Baltrinic | last post: by
17 posts views Thread by =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post: by
7 posts views Thread by =?Utf-8?B?QWxleCBDb2hu?= | last post: by
3 posts views Thread by odwrotnie | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.