Torrwin
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
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, the RawToHex and HexToRaw functions were exactly what I needed.