On Wed, Jan 02, 2002 at 04:47:43PM -0600, "Accardo, Glen" <[EMAIL PROTECTED]> wrote:
>
>
> Many stored procedures (sp_help and sp_depends with SQL Server, for
> example) return multiple result sets. The following bit of code
> should be the simplest way to print the output of sp_depends. However,
> it only prints the first of two result sets. The second result set is
> not returned. Looking through the code in ADO.pm, there does not seem
> to be support for multiple result sets.
>
> Is support for multiple result sets planned? Is there a work-around?
> How can I get the rest of the stored procedure output?
I submitted the patch to add multiple result set support to DBD::ODBC,
and I can tell you it gets deep down into the guts of things. I don't
know ADO at all or I might take a stab at it, but it is probably not a
simple fix. Seems like it ought to be addressed, though. I know that
DBD::ODBC was unable to fetch multiple result sets until I patched it.
> use DBI;
> $dbh = DBI->connect("dbi:ADO:Provider=SQLOLEDB;" .
> "Data Source=Instance1;" .
> "Initial Catalog=northwind;" .
> "User ID=sa;Password=password;");
>
> $sth = $dbh->prepare("exec sp_depends 'order subtotals'");
> $rc = $sth->execute();
> $temp = $sth->dump_results();
>
> Thanks,
> glen
> [EMAIL PROTECTED]
--
David Good [EMAIL PROTECTED]
This space intentionally left blank.