Re: PreparedStatement with Hexadecimal Literals
Posted by: Alexander Soklakov
Date: July 18, 2013 03:32AM


You are right, there is a limitation here because we can't distinguish literals and non-literal strings and JDBC spec has no special method for setting literals.

You can build the sql query with a StringBuilder or deconstruct literal and call something like:

ps.setBytes(1, new byte[] { 0x4D, 0x79, 0x53, 0x51, 0x4C });


Edited 1 time(s). Last edit at 07/18/2013 03:39AM by Alexander Soklakov.

Options: ReplyQuote

Written By
Re: PreparedStatement with Hexadecimal Literals
July 18, 2013 03:32AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.