Hi,

I'm running into the following issue:

I have an insert query on a table with several blob type columns (as
well as columns of other types). The insert query was generated by a
MySQL dump, where the blob values are represented in the final string
as hexidecimal values. For example, my code would be something like

String query = "INSERT INTO `my table` (`field`, `field2`, field3`)
VALUES
('value1', value2,
0x3565303263666530353561383039346435336331373734643233623266363039)"

I then run this query using:

Statement s = connection.createStatement();
s.executeUpdate(query);

The insert then fails with the following error:

Hexadecimal string with odd number of characters:
24151365170745754550414754817295888861833632876261387367437141647564379402297
[90003-106]

I get an identical error if I replace the hexidecimal value with a
real value, e.g.

String query = "INSERT INTO `my table` (`field`, `field2`, field3`)
VALUES
('value1', value2, 'value3')"

Can H2 only read in hexidecimals via s.executeUpdate? Or am I missing
something? Currently I'm working around this issue using prepared
statements, but I'm just wondering if there is a more straightforward
way of solving this issue?

Thanks in advance to anyone who can shed some light on this!

Bart



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to