Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java mybatis存储进程未提交_Java_Mysql_Mybatis - Fatal编程技术网

Java mybatis存储进程未提交

Java mybatis存储进程未提交,java,mysql,mybatis,Java,Mysql,Mybatis,我正在通过mybatis调用mysql存储过程。但我的进程没有在sql server中提交,而是锁定了表。我已经编写了自动提交JDBC调用的代码。有人能帮我解决这个问题吗 This below is the xml code to call proc: <select id="getContactUpdated" statementType="CALLABLE" resultType=" xxx "> { call [cia-reporting].dbo.reports_Re

我正在通过mybatis调用mysql存储过程。但我的进程没有在sql server中提交,而是锁定了表。我已经编写了自动提交JDBC调用的代码。有人能帮我解决这个问题吗

This below is the xml code to call proc:
<select id="getContactUpdated" statementType="CALLABLE" resultType=" xxx ">
    { call [cia-reporting].dbo.reports_ReturnRoiReports(                
                #{custom1},
                #{custom2},
                #{custom3}
)}`enter code here`

Java code:
    SqlSession sqlSession = sqlSessionFactory.openSession();
    {
        try {
            mapper = sqlSession.getMapper(xxx.class);
            sqlSession.getConnection().setAutoCommit(true);

        } catch (Exception ex) {
            System.out.println(ex);
        }
    }
下面是调用proc的xml代码:
{呼叫[中情局报告].dbo.reports_returnroi reports(
#{custom1},
#{custom2},
#{custom3}
)}`在这里输入代码`
Java代码:
SqlSession SqlSession=sqlSessionFactory.openSession();
{
试一试{
mapper=sqlSession.getMapper(xxx.class);
sqlSession.getConnection().setAutoCommit(true);
}捕获(例外情况除外){
系统输出打印项次(ex);
}
}
请让我知道,如果你需要任何更多的信息。 谢谢
Shilpa.

您的程序是否更新了smth?如果您只是选择,则不需要提交。如果您更新smth,则需要在mybatis代码中使用My proc返回一个包含提供的输入参数的数据表。它不更新数据库中的任何内容。您的过程是否更新smth?如果您只是选择,则不需要提交。如果您更新smth,则需要在mybatis代码中使用My proc返回一个包含提供的输入参数的数据表。它不会更新数据库中的任何内容。