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 20_October_2004_K.pl line 209, line 29. #### sub Got_Command { my($Command,$Request_id, $outputfile) = @_; print "Hi_F\n"; print "here\n"; # my $output_file = "Output/Output_file_".$Request_id.".txt"; open (OUTPUT_FILE, ">$outputfile"); print "$Command\n"; my $sthB_A = $dbh->prepare($Command) or die "Couldn't prepare query: ".$dbh->errstr; $sthB_A->execute() or die "Couldn't execute query: ".$sthB_A->errstr; my $Return_results = "Select * from Result_storage_keep where Unique_identifier = ".$Request_id." AND Aggregated_area = Instance_name AND Disease_cat = Cause_catagory\;"; print "$Return_results"; print "$Return_results\n"; my $sth_C = $dbh->prepare($Return_results) or die "Couldn't prepare query: ".$dbh->errstr; $sth_C->execute() or die "Couldn't execute query: ".$sth_C->errstr; ####The problem shows up here while (my @row = $sth_C->fetchrow_array ) { print OUTPUT_FILE join("\t", @row); print OUTPUT_FILE "\n"; } }