• Post Reply Bookmark Topic Watch Topic
  • New Topic

JBuilder -->SQL Server2000 Chinese display problem, HELP NEEDED!

 
fengzixuan zheng
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your concern
Enviorment: Windows2000 SP2 Chinese and SQL Server2000 SP2 Chinese, JBuilder 6.0.482 English.
I'm using MS SQL Server2000 JDBC Driver to connect to the database, no problem, when I using following code to get data from the table, when displaying English no problem, but Chinese can not display properly.
Need you help.
public void getValue() {
try {
if(rs.next()){
String strName=(String)rs.getString("Name");
this.tfName.setText(strName);
}
else{
this.btnNext.setEnabled(false);
}
}catch (Exception e){
e.printStackTrace();
}
}
The column "Name" in my SQL Server table is "varchar" .
Thanks again

fengzixuan Zheng
 
fengzixuan zheng
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I resolve this problem now, by change the data type to nvarchar.
Thank you all the way.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!