BBS水木清华站∶精华区

发信人: wupopo (wupopo), 信区: Java 
标  题: 关于Java通过JDBC访问数据库的完全解决方案 
发信站: BBS 水木清华站 (Fri May 12 01:09:51 2000) WWW-POST 
 
oracle: 
 在application中完全没有问题 
 在jsp中 , 
 1).jsp中 
  aa.insertString(str1.getBytes("ISO-8859-1") 
  aa是一个javabean 
  2)aa的实现 
   insertString(byte[] b1){ 
     String s1=new String("GBK"); 
...} 
 
SQL Server 
  String s1="为什么“; 
  PareparedStatement stmt=conn.createStatement("insert xs values(?,?)"); 
  ... 
  stmt.setBytes(s1.getBytes("GBK")); 
 
有何问题,mail to wujingzhong@sina.com 
 
 
-- 
※ 来源:·BBS 水木清华站 smth.org·[FROM: 202.108.21.142]  

BBS水木清华站∶精华区