Link to home
Start Free TrialLog in
Avatar of Torrwin
TorrwinFlag for United States of America

asked on

Insert Raw Data Into Oracle Table

Hello,

I have a table from a 3rd party Oracle database with an ID column whose data type is RAW(16).  I am trying to insert these ID values to a new table via a VB.NET console application that uses an ODBC connection.

Basically, i'm reading the data from the source, and then creating INSERT statements for the appropriate records to the new table.  However, for the ID column, VB.NET creates the following as the SQL: "INSERT INTO TABLE1(ID) VALUES(System.Byte[]);"

What do I need to do in order to successfully insert RAW data into the new table?

Thanks,
-Torrwin
Avatar of vvk
vvk

oracle should take char data in hexadecimal format with 2 characters representation per byte. or if you have utl_raw package installed you can use something like utl_raw.cast_to_raw('text to convert') to make raw values
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Torrwin

ASKER

Thanks, the RawToHex and HexToRaw functions were exactly what I needed.