Inserting Ascii(128-255) characters into SQL Server database 
Author Message
 Inserting Ascii(128-255) characters into SQL Server database

I trying to insert high ascii characters into a SQL Server
database using Microsoft's JDBC driver. When inserted the
characters are converted to ?.

The following code doesn't not work.
String s = new String("t's");
lPreparedStatement.setString(1,s);    
lPreparedStatement.executeUpdate();

Selecting this value using Query Analyzer gives t?s.

I was able to get this to work by:

String s = new String("t's");
lPreparedStatement.setString(1,new String( s.getBytes("ISO-
8859-1")));    
lPreparedStatement.executeUpdate();

Has anyone come across this issue and knows of a simpler
way to resolve this issue?



Wed, 16 Nov 2005 05:38:17 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. 128 Character limit on Insert?

2. ASP program insert more than 255 characters into field defined as TEXT in SEQ Server

3. Dynamic SQL, Parameter exceeds 128 characters

4. 128 character SQL String length limit??

5. 255 characters returned from SQL server.

6. 255 characters returned from SQL server.

7. insert into a varchar column > 255 characters

8. probs in Assigning more then 128 characters to a variable in SQL2000

9. 128 Character Limit?

10. Receiving a 128 character limit error

11. how use KEYB for more than 128 characters?

12. Open Server Parameters > 255 characters


 
Powered by phpBB® Forum Software