Menu

Software error while deleting rejected topics

Help
2007-02-13
2013-06-03
  • Yahor Sinkevich

    Yahor Sinkevich - 2007-02-13

    Software error:
    DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt (SQL-HY000)(DBD: st_execute/SQLExecute err=-1) at D:/TOOLS/codestriker-1.9.2/bin/../lib/Codestriker/Model/Topic.pm line 1022.

    For help, please send mail to the webmaster (eug@ultersys.ru), giving this error message and the time and date of the error.

     
    • David Sitsky

      David Sitsky - 2007-02-14

      This is a SQL Server specific issue, since it can't handle nested queries (ggrrrr).  We'd need to modify the code in lib/Codestriker/Model/Topic.pm around line 1022, which currently looks like this:

          # Now do the deed.
          $success &&= $select->execute($self->{topicid});
          if ($success) {
          while (my ($commentstateid) = $select->fetchrow_array()) {
              $success &&= $delete_comments->execute($commentstateid);
              $success &&= $commentstate_history->execute($commentstateid);
                  $success &&= $delete_commentstate_metric->execute($commentstateid);
          }
          $success &&= $select->finish();
          }

      to this:

          # Now do the deed.
          $success &&= $select->execute($self->{topicid});
          if ($success) {
              foreach my $commentstateid (@{$select->fetchall_arrayref()}) {
              $success &&= $delete_comments->execute($commentstateid);
              $success &&= $commentstate_history->execute($commentstateid);
                  $success &&= $delete_commentstate_metric->execute($commentstateid);
              }
          }

      Note - I haven't tested the code - but can you let me know if this works?  If so, I'll commit it in.  Thanks.

      Cheers,
      David

       
      • David Sitsky

        David Sitsky - 2007-02-14

        Actually the code should be something like this.  Unfortunately, I can't test/compile this from where I am.

            # Now do the deed.
            $success &&= $select->execute($self->{topicid});
            if ($success) {
                foreach my $commentstate (@{$select->fetchall_arrayref()}) {
                    my $commentstateid = $commentstate->[0];
                $success &&= $delete_comments->execute($commentstateid);
                $success &&= $commentstate_history->execute($commentstateid);
                    $success &&= $delete_commentstate_metric->execute($commentstateid);
                }
            }

         
    • Yahor Sinkevich

      Yahor Sinkevich - 2007-02-15

      Yep! Looks like now it works.
      Thanks.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.