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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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
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);
}
}
Yep! Looks like now it works.
Thanks.