in reply to Retrieving a result from a MS SQL Stored Procedure using DBI and ADO under Win32 Perl

Issue resolved!!

I was concentrating on the Perl script when the problem resided in the Stored Proc. A friend suggested I add this at the beginning of by SP "SET NOCOUNT ON" and it solved all my problems. I don't exactly understand what those magic three words mean but I'll look it up later.

  • Comment on Re: Retrieving a result from a MS SQL Stored Procedure using DBI and ADO under Win32 Perl

Replies are listed 'Best First'.
Re^2: Retrieving a result from a MS SQL Stored Procedure using DBI and ADO under Win32 Perl
by Anonymous Monk on Aug 17, 2016 at 09:40 UTC

    Yes setting "SET NOCOUNT ON" in SP is worked and it produced all my data but at the end it showing an error:

    0 rows (1: no select statement currently executing (SQL-HY000)) DBD::ODBC::st dump_results failed: no select statement currently execu +ting (SQL- HY000) at line
      Thanks for sharing, i've got the same issue, and you can prepend SET NOCOUNT ON to your exec statement if you cannot modify the stored procedure.

      Issue resolved...used for loop instead of while for dump_results