Can not issue data manipulation statements with executeQuery().解决的方法
query是查询用的,而update是插入和更新,删除修改用的。
executeQuery()语句是用于产生单个结果集的语句,如select语句,在什么情况下用,当你的数据库已经保存了数据后,要进行查询了。
executeUpdate(),用于执行insert、update或者delete语句,返回值一个表示受影响的行数,即更新值
execute()运行语句,返回是否有结果集。
如下这样写就没有问题了.
String sql = "insert into student(id,name,age,sex,address) values(10,'郭靖',25,'男','桃花岛')";
int rs = stmt.executeUpdate(sql);
Can not issue data manipulation statements with executeQuery().解决的方法的更多相关文章
- java.sql.SQLException: Can not issue data manipulation statements with executeQuery().
1.错误描写叙述 java.sql.SQLException: Can not issue data manipulation statements with executeQuery(). at c ...
- Can not issue data manipulation statements with executeQuery()错误解决
转: Can not issue data manipulation statements with executeQuery()错误解决 2012年03月27日 15:47:52 katalya 阅 ...
- Can not issue data manipulation statements with executeQuery().解决方案
这个错误提示是说无法发行sql语句到指定的位置 错误写法: 正确写法: excuteQuery是查询语句,而我要调用的是更新的语句,所以这样数据库很为难到底要干嘛,实际我想用的是更新,但是我写成了查询 ...
- Can not issue data manipulation statements with executeQuery()的解决方案
Can not issue data manipulation statements with executeQuery() 报错的解决方案: 把“ResultSet rs = statement. ...
- Can not issue data manipulation statements with executeQuery() 异常处理
1.这个异常的报错翻译过来就是 不能发出数据操纵语句与executeQuery() 2.这里要检查一下你要执行的实际SQL语句要做什么操作 查询呢?还是修改? 3.如果是修改的话,需要添加@Modif ...
- Can not issue data manipulation statements with executeQuery().
这个错误提示是说无法发行sql语句到指定的位置 就是如图的两端代码的问题,excuteQuery是查询语句,而我要调用的是更新的语句,所以这样数据库很为难到底要干嘛,我实际的操作是要更新数据,所以把 ...
- Best packages for data manipulation in R
dplyr and data.table are amazing packages that make data manipulation in R fun. Both packages have t ...
- The dplyr package has been updated with new data manipulation commands for filters, joins and set operations.(转)
dplyr 0.4.0 January 9, 2015 in Uncategorized I’m very pleased to announce that dplyr 0.4.0 is now av ...
- 【转】Hive Data Manipulation Language
Hive Data Manipulation Language Hive Data Manipulation Language Loading files into tables Syntax Syn ...
随机推荐
- PHP htmlspecialchars和htmlspecialchars_decode(函数)
htmlspecialchars() 函数把一些预定义的字符转换为 HTML 实体. 函数原型:htmlspecialchars(string,quotestyle,character-set) 预定 ...
- 合并静态库出现 can't move temporary file错误
静态库的制作就不说了很简单,网上也很多例子,这里主要讲下我合并通用静态库时候遇见的坑,在合并前注意.a文件一定要正确,我有一次scheme选了release但是device忘了换,结果怼着两个模拟器静 ...
- [LeetCode] Friend Circles 朋友圈
There are N students in a class. Some of them are friends, while some are not. Their friendship is t ...
- Spring 学习一
Spring工作机制及为什么要用? 1.springmvc将所有的请求都提交给DispacherServlet,他会委托应用系统的其他模块负责对请求进行真正的处理工作. 2.DispacherServ ...
- servlet导出Excel
package khservlet; import java.io.IOException;import java.io.PrintWriter;import java.sql.*; import j ...
- Spring中实现定时调度
1, 内容简介 所谓的定时调度,是指在无人值守的时候系统可以在某一时刻执行某些特定的功能采用的一种机制,对于传统的开发而言,定时调度的操作分为两种形式: 定时触发:到某一时间点上执行某些处理操作: ...
- 基于Bootstrap+angular的一个豆瓣电影app
1.搭建项目框架 npm初始化项目 npm init -y //按默认配置初始化项目 安装需要的第三方库 npm install bootstrap angular angular-route --s ...
- 如何通过css设置表格居中
CSS控制整个表格居中,不只是让表格里的文字居中,是整个表格居中1. 不用table的Align="center",要用CSS实现2. 不加<center></c ...
- centos7架设vsftpd服务
网络控制相关命令: systemctl status network 网络状态 systemctl restart network 网络重启 查看网络状态: nmcli connection show ...
- jmeter连接配置带跳板机(SSH)的mysql服务器
jmeter连接配置mysql服务器时,如果数据库服务器没有通过ssh连接,则只需要配置相应的jdbc参数就可以了,即请求域名或ip地址:3306,如果数据库服务器是通过SSH连接的,那需要通过中间远 ...