使用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 "是从哪儿来的?