Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-967

clearParameters() breaks validity when using output parameters in stored procedures

    XMLWordPrintable

Details

    Description

      If you would like to use output parameters in stored procedures, you have to register these parameters with "registerOutParameter". You do not have to initialize the parameter with a value, because it is a output parameter.

      If you would like to reuse a stored procedure, a common pattern is to call "clearParameters" to get rid of any input parameter value. After the "clearParameters" you have to set an explicit value for the output parrameter. Otherwise you will get an expception eg "Caused by: java.sql.SQLTransientConnectionException: (conn=5) Parameter at position 2 is not set". That's wrong.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            floerke@doctronic.de Holger Flörke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.