当前位置: 代码迷 >> J2SE >> 怎么解决:[Microsoft][SQLServer JDBC Driver]Unhandled data type: TDS_INT8
  详细解决方案

怎么解决:[Microsoft][SQLServer JDBC Driver]Unhandled data type: TDS_INT8

热度:53   发布时间:2016-04-24 14:11:20.0
如何解决:[Microsoft][SQLServer JDBC Driver]Unhandled data type: TDS_INT8
使用Java写了两个函数:
//这个函数运行时没有任何问题
public   boolean   SystemLogin(String   username,   String   password)
{
String   txtSql   =   "SELECT   ID   FROM   t_Login   WHERE   ID   =?   AND   password=?   ";
ResultSet   rs     =   null   ;  
try
{
PreparedStatement   ps   =   cnn.prepareStatement(txtSql);
ps.setString(1,   username);
ps.setString(2,   password);
rs   =   ps.executeQuery();
return   rs.next();  
}catch(Exception   e)
{
System.out.println(e.getMessage().toString());
return   false;
}

}


//这个函数运行起来报错,报错信息为:[Microsoft][SQLServer   JDBC   Driver]Unhandled   data   type:   TDS_INT8

public   String   getCardInfo(String   YYZH)
{      
String   txtSql   =   "SELECT   ID   FROM   jcxx   WHERE   YYZH=?   ";
ResultSet   rs     =   null   ;  
try
{
PreparedStatement   ps   =   cnn.prepareStatement(txtSql);
ps.setString(1,   YYZH);
rs   =   ps.executeQuery();

System.out.println(rs.getString( "XM "));
return   "真 ";


}catch(Exception   e)
{
System.out.println(e.getMessage().toString());
return   null;
}

}

请问各位高手,这个问题该如何解决?


------解决方案--------------------
那个rs中的 "XM "是从哪儿来的?
  相关解决方案