Hi, I am trying to insert Hebrew characters into a VARCHAR column in a MSSQL Server 7.0 database. I am using the JdbcOdbcBridge on jdk1.3.01_1 w/ win2000. It does not want to accept the characters... All Hebrew character become "???" (question marks). I tried to set a Properties object with charSet property set to "ISO-8859-1" (which supports Hebrew). Another trial was to use PreparedStatement.setCharacterStream (which supports Unicode!!!). I tried you use setByteStream() into a BINARY column. I tried to serialize the whole String with the Hebrew data into a BINARY column. ALL OF THESE DIDN'T HELP!!! Everytime I select the data it comes out with "???". I know that the problem is during inserting the data, because when I type Hebrew data in the Enterprise Manager (directly to the table), the application manages to select the Hebrew data properly.
It may be a case where you should be using unicode instead of ascii. I believe you also need to set up your columns as nvarchar (there are unicode equivalents to char, varchar, etc) Dan
Joined: Nov 21, 2001
Originally posted by Daniel Dunleavy: It may be a case where you should be using unicode instead of ascii. David - What do you mean by that, isn't Java is Unicode based? using PreparedStatement.setCharacterStream() is unicode baed (according to the API). I believe you also need to set up your columns as nvarchar (there are unicode equivalents to char, varchar, etc) Dan
Joined: Mar 13, 2001
Yes, but when your database does not know if your going to use Java or M$. I was talking about your M$ SQL SERVER database column definitions. Dan