Can not issue data manipulation......
来源:互联网 发布:网络普通发票管理系统 编辑:程序博客网 时间:2024/06/04 19:11
java.sql.SQLException: Can not issue data manipulation statements with executeQuery():
如果你的SQL 语句是诸如update,insert的更新语句,应该用statement的execute()方法,如果用的是statement的executeQuery()就会出现上诉问题,原因:<br />executeQuery<br />ResultSet executeQuery(String sql)<br /> throws SQLException执行给定的 SQL 语句,该语句返回单个 ResultSet 对象。 <br /><br />参数:<br />sql - 要发送给数据库的 SQL 语句,通常为静态 SQL SELECT 语句 <br />返回:<br />包含给定查询所生成数据的 ResultSet 对象;永远不能为 null <br />抛出: <br />SQLException - 如果发生数据库访问错误或者给定 SQL 语句生成单个 ResultSet 对象之外的任何其他内容<br /><br />简单说查询语句用executeQuery(sql), 更新语句用execute()。所以你只要将executeQuery(update_sql)这些代码改成execute(update_sql)就可以了。<br />希望能对你有帮助。
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/liujinchengjx/archive/2007/03/05/1520776.aspx
- Can not issue data manipulation......
- Can not issue data manipulation statements with executeQuery()错误解决
- Can not issue data manipulation statements with executeQuery()错误解决
- Can not issue data manipulation statements with executeQuery()错误解决
- Can not issue data manipulation statements with executeQuery().
- 兔子-- Can not issue data manipulation statements with executeQuery()
- Can not issue data manipulation statements with executeQuery()解决方案
- Can not issue data manipulation statements with executeQuery()
- Can not issue data manipulation statements with executeQuery()
- Can not issue data manipulation statements with executeQuery()错误解决
- Can not issue data manipulation statements with executeQuery().
- Can not issue data manipulation statements with executeQuery().问题的解决
- java.sql.SQLException: Can not issue data manipulation statements with executeQuery().
- java.sql.SQLException:Can not issue data manipulation statements with executeQuery()
- java.sql.SQLException: Can not issue data manipulation statements with executeQuery().
- Caused by: java.sql.SQLException: Can not issue data manipulation statements with executeQuery().
- JavaBean链接MySQL数据库错误aq.executeQuery.Can not issue data manipulation statements with executeQuery()解决
- MySQL——报错:Can not issue data manipulation statements with executeQuery().
- 关于垃圾回收器工作机制
- [zt ]Exception in thread "main" .........
- JDK1.6环境变量配置
- 邮件合并是的数字问题
- [Z]Jtable的使用
- Can not issue data manipulation......
- JAVA2EXE
- [z]SVN入门及配置使用
- 通用异步收发器UART-学习笔记
- android2.0安装
- [zt]用xmpp架设自己的Openfire聊天服务器
- XMPP
- Android开发-新建Activity
- Java 获得天气信息