public String TranStrType(String str) throws Exception
{
try{
if(str==null)
return null;
else
{
str = new String(str.getBytes("ISO8859_1"),"gb2312");
return str;
}
}catch(Exception e){
return null;
}
}
{
try{
if(str==null)
return null;
else
{
str = new String(str.getBytes("ISO8859_1"),"gb2312");
return str;
}
}catch(Exception e){
return null;
}
}
jdbc:microsoft:sqlserver://lzg:1433;charset=gb2312
其它的URL的属性可以查看sqlserver jdbc driver的帮助文档
我按照你的方法试了,出来的还是乱码,是不是跟JDBC驱动器的版本有关呀??