Aaaa_121 2016-07-14 04:49 采纳率: 0%
浏览 1004

在使用CallableaStatement语句时,出现问题怎么解决

这个是我的代码:
public class CallableStatementTest {
public static void main(String[] args) {
test1();
}
static void test1(){
Connection con=DButil.open();
try {
CallableStatement cstmt=con.prepareCall("{call all_people()}");
ResultSet rs=cstmt.executeQuery();
while(rs.next())
{
String id=rs.getString(1);
String name=rs.getString(2);
System.out.println(id+","+name);
}
} catch (SQLException e) {
e.printStackTrace();
}finally{
DButil.close(con);
}

}
出现的问题:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION all_people does not exist
谢谢了
  • 写回答

1条回答 默认 最新

  • 微风吹过的夏天2016 2016-07-14 05:47
    关注

    存储过程all_people没找到。

    评论

报告相同问题?