Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-3

SQLBindCol fails with error 07009

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Windows 32/64 bit

    Description

      When trying to bind a column to a statement which was previously executed via SQLExecDirect, SQLBindCol fails with 07009 - Invalid descriptor index.

      According to the MSDN ODBC documentation (see hhttp://msdn.microsoft.com/en-us/library/ms711010%28v=vs.85%29.aspx) an error should be returned only, if the last executed statement produced an result set.

      Suggested fix:

      ma_statement.c

        if ((ColumnNumber < 1 && Stmt->Options.UseBookmarks == SQL_UB_OFF) || 
            (mysql_stmt_field_count(Stmt->stmt) &&
             Stmt->stmt->state > MYSQL_STMT_PREPARED && 
             ColumnNumber > mysql_stmt_field_count(Stmt->stmt)))
        {
          MADB_SetError(&Stmt->Error, MADB_ERR_07009, NULL, 0);
          return SQL_ERROR;
        }

      Attachments

        Activity

          People

            georg Georg Richter
            georg Georg Richter
            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.