求解:Oracle jdbc 驱动

异常:
testing oracle-character-set-1 against <abc>
    PASSED LOSSY
testing oracle-character-set-1 against <ab?c>
    PASSED LOSSY
testing oracle-character-set-1 against <XYZ>
    PASSED LOSSY
testing oracle-character-set-1 against <longlonglonglong...>
    PASSED LOSSY
testing oracle-character-set-31 against <abc>
    PASSED LOSSY
testing oracle-character-set-31 against <ab?c>
    PASSED LOSSY
testing oracle-character-set-31 against <XYZ>
    PASSED LOSSY
testing oracle-character-set-31 against <longlonglonglong...>
    PASSED LOSSY
testing oracle-character-set-870 against <abc>
    PASSED
testing oracle-character-set-870 against <ab?c>
    PASSED
testing oracle-character-set-870 against <XYZ>
    PASSED
testing oracle-character-set-870 against <longlonglonglong...>
    PASSED
testing oracle-character-set-871 against <abc>
    PASSED
testing oracle-character-set-871 against <ab?c>
    PASSED
testing oracle-character-set-871 against <XYZ>
    PASSED
testing oracle-character-set-871 against <longlonglonglong...>
    PASSED

源码:
import java.sql.*;
public class Db {

PreparedStatement ps=null;
Connection ct=null;
ResultSet rs=null;

Db(){
 
  try{
   Class.forName("oracle.jdbc.OracleDriver");
   ct=DriverManager.getConnection("jdbc:oracle:thin: @127.0.0.1 :1521:ORC1","scott","scott");
   ps=ct.prepareStatement("select * from emp");
   rs=ps.executeQuery();
  
   while(rs.next()){
    System.out.println(rs.getString(2));
   }
  }catch(Exception e){
   e.printStackTrace();
  }
}

public static void main(){
  new Db();
}

条件:
jdk1.6
ojdbc6.jar

表结构:
图片

你可能感兴趣的:(oracle,数据库,jdbc,驱动,表)