Thursday 15 March 2012

java - DB2 database using unicode -


I have a problem with the DB2 database which should contain Unicode characters. The connection is established using JDBC. INSERT (1, N 'N') values ​​in my_table (id, string_field) values, what do I have to do if I want to insert a Unicode string into the database? My unicode string '); INSERT (1, 'my unicode string') in

or

  my_table (id, string_field) values;  

I do not know whether to use N-prefix or not for most databases there works great when using it but I am not quite sure about DB2 . I also have a problem that I do not have a DB2 database where I can test these statements. :-(

Thank you very much!

document (DB2 form) In this) 9.7) It says:

A graphic string constant specifies a different graphic string in which there is a sequence of double-byte characters which are single-byte apostrof (') Starts and ends, and it happens before a single byte or n. The letter between the apostrophes should represent any number of bytes, and the length of the graphic string should not exceed 16 336 bytes.


No comments:

Post a Comment