• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I resolve this problem now, by change the data type to nvarchar.
Thank you all the way.
 
No thanks. We have all the government we need. This tiny ad would like you to leave now:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic