java调用存储过程???数据(列的位置)不能调换吗??
新的问题有出了 
 ??? 
 建表 
 create   table   gao 
 ( 
       id   not   null   identity(1,1)   primary   key, 
       name   varchar(20), 
       sex   varchar(5), 
       aa   int, 
       bb   int 
 ) 
 建视图 
 create   view   tt 
 as 
 ( 
          select   [id],name,sex,aa,bb   from   gao    
 ) 
 建存储过程 
 create   proc   g 
 @p1   int, 
 @p2   int 
 as 
       select   [id],name,sex,aa,bb   from   tt   where   aa=@p1   and   bb=@p2   
 java调用它      并输出表中的数据 
 try 
          { 
             CallableStatement   callst   =   null; 
             Connection   con   =   Jdbc.getConnection()   ; 
             callst   =   con.prepareCall( "{call   espshang(?,?)} ")   ;               
             callst.setInt(1,1)   ; 
             callst.setInt(2,2)   ; 
             callst.execute()   ;                            
             ResultSet   rs   =   callst.getResultSet()   ;    
             while(rs.next()) 
             { 
                                  System.out.println(rs.getInt( "id "))   ;   ----看这里1 
                                  System.out.println(rs.getString( "name "))   ; 
                                  System.out.println(rs.getString( "sex "))   ; 
             } 
          }catch(Exception   e) 
          { 
          e.printStackTrace()   ; 
          } 
 以上程序是正确的 
       但我想这样输出,该如何??   
                while(rs.next()) 
             {    
                                  System.out.println(rs.getString( "name "))   ;----看这里1 
                                  System.out.println(rs.getInt( "id "))   ;                            
                                  System.out.println(rs.getString( "sex "))   ; 
             }   
    位置可是变了呀!怎么就不对了?????? 
------解决方案--------------------也许跟ResultSet数据的排序有关系。 
 顶一下!
------解决方案--------------------lz这样写应该没有问题,报什么异常?
------解决方案--------------------这可能和ResultSet类的设计有关,你可以看一下原代码 
 如果你想改变显示顺序,那就用rs.getX*J()赋予相应的变量,在按照你想要的 
 顺序输出就可以了 
 例如: 
 int id=rs.getInt( "id "); 
 String name=rs.getString( "name "); 
 String sex=rs.getString( "sex "); 
 System.out.println(name); 
 System.out.println(id) ;          
 System.out.println(sex) ;
------解决方案--------------------换驱动,用jtds