错误出现:

含有错误的查询后,选中insert语句无法执行,报错current transaction is aborted, commands ignored until end of transaction block

分析:

事务中含有错误,再执行DML时,事务无法正常进行。

解决方法:

1.尝试connection.setAutoCommit(true);无法执行

2.直接commit ,提交后再执行insert语句,成功插入。

参考了stackoverflow的解法:

https://stackoverflow.com/questions/10399727/psqlexception-current-transaction-is-aborted-commands-ignored-until-end-of-tra

navicat中执行PostgreSQL错误解决:ERROR: current transaction is aborted, commands ignored until end of transaction block的更多相关文章

  1. current transaction is aborted, commands ignored until end of transaction block

    current transaction is aborted, commands ignored until end of transaction block Error updating datab ...

  2. win7 安装过程中遇到的错误解决方法

    win7 安装过程中遇到的错误解决方法 windows安装无法继续.若要安装windows 请单击 确定 重新启动计算机: 当 出现如上提示的时候,按下shift+f10 会打开命令窗口,进入到C:\ ...

  3. MYSQL导入CSV格式文件数据执行提示错误(ERROR 1290): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement.

    MYSQL导入CSV格式文件数据执行提示错误(ERROR 1290): The MySQL server is running with the --secure-file-priv option s ...

  4. mac上Navicat新建数据库3680错误解决办法

    mac上Navicat新建数据库3680错误解决办法 1.在设置里关闭mysql,若不能关闭,在终端输入: sudo /usr/local/mysql/support-files/mysql.serv ...

  5. PHP中Strict Standards错误解决方法二

    在PHP5.3.3 中安装wordpress 3.0.1 ,在安装时出现错误:Strict Standards: PHP Strict Standards: Declaration of Walker ...

  6. PL/SQL“ ORA-14551: 无法在查询中执行 DML 操作”解决

    环境 Oracle 11.2.0 + SQL Plus 问题 根据以下要求编写函数:将scott.emp表中工资低于平均工资的职工工资加上200,并返回修改了工资的总人数.PL/SQL中有更新的操作, ...

  7. maven 中使用jstl 错误解决

    maven 中使用jstl表达式中出现如上错误.原因: 导入jstl 的jar包,却没有在pom文件中添加jstl相关的jar依赖项. <!--jstl表达式--> <depende ...

  8. 【转】linux中执行外部命令提示" error while loading shared libraries"时的解决办法

    今天在Centos下编译kapar 后执行时出错,老说: [root@dc01 ~]# kapar kapar: error while loading shared libraries: libsc ...

  9. navicat 中执行sql脚本 喊中文错误

    执行内容和上篇一样,只是换了工具. 执行成功,但是数据库对应中文没有内容. sql脚本的编码是asci 执行的时候选择gbk 编码

随机推荐

  1. spring boot 生命周期初探

    1.MytestApplication package com.gomepay; import org.springframework.boot.Banner; import org.springfr ...

  2. 使用 prototype 定义方法和属性

    除了可以在类的构造器方法中定义方法和属性外,也可以使用 prototype 定义方法和属性.每个类都有这个属性,该属性是一个静态属性,因此无需实例化,只需使用类引用该属性即可. 1.1 使用 prot ...

  3. Zookeeper--命令介绍

    参考 https://zookeeper.apache.org/doc/r3.4.13/zookeeperStarted.html#sc_ConnectingToZooKeeper 连接到zookee ...

  4. mac item2自定义光标移动快捷键,移动行首行尾,按单词跳转

    To jump between words and start/end of lines in iTerm2 follow these steps: iTerm2 -> Preferences ...

  5. Exchange 2016 CU12安装报错

    1.         报错信息: Exchange 2016 升级 CU12补丁报错,主要是在进行第10步安装管理工具时报SeSecurityPrivilega错误,详细如下: 查看安装log信息如下 ...

  6. Vue.js(15)之 json-server搭建模拟的API服务器

    json-server搭建模拟的API服务器 运行命令 npm install json-server -D 全局安装 json-server 项目根目录下创建 mock 文件夹 mock 文件夹下添 ...

  7. .NET技术-6.0. Expression 表达式树 生成 Lambda

    .NET技术-6.0. Expression 表达式树 生成 Lambda public static event Func<Student, bool> myevent; public ...

  8. SQL server 查询常用语句 2019.3.20

    SQL查询语句 select ...列名 from 表名 投影查询 select sno num,2019-sage as birthday // 给列起别名 from student: 在每个学生姓 ...

  9. 【Python】关于import QtCore报错的处理方法

    刚开始学习使用PyQT,但总碰到一些小挫折 比如 import Pyqt成功 而 from PyQt5 import QtCore, QtGui, QtWidgets却报错,找了半天终于找到资料,原因 ...

  10. SQL基础教程(第2版)第8章 SQL高级处理:8-1 窗口函数

    第8章 SQL高级处理:8-1 窗口函数 ● 窗口函数可以进行排序.生成序列号等一般的聚合函数无法实现的高级操作.● 理解PARTITION BY和ORDER BY这两个关键字的含义十分重要. ■什么 ...