I am in the process of converting applications from MSSQL DBLib
to DBD::ADO.  So far, all of the query results are OK, but there
are several problems with stored procedures.  

For example, running sp_depends on the [order subtotals] table in the
Northwind database produces the following two result sets in
isql, Query Analyzer, and in MSSQL DBLib.

     In the current database, the specified object references the following:
      dbo.Order Details    user table       no   no   Discount
      dbo.Order Details    user table       no   no   OrderID
      dbo.Order Details    user table       no   no   UnitPrice
      dbo.Order Details    user table       no   no   Quantity

     In the current database, the specified object is referenced by the
following:
      dbo.Employee Sales by Country         stored procedure
      dbo.Sales by Year                     stored procedure
      dbo.Sales Totals by Amount            view
      dbo.Summary of Sales by Quarter       view
      dbo.Summary of Sales by Year          view


When running the following bit of code, the output is abbreviated to the 
first set of rows returned by sp_depends.

     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();

Output of the above script:
     'dbo.Order Details', 'user table', 'no', 'no', 'Discount'
     'dbo.Order Details', 'user table', 'no', 'no', 'OrderID'
     'dbo.Order Details', 'user table', 'no', 'no', 'UnitPrice'
     'dbo.Order Details', 'user table', 'no', 'no', 'Quantity'
     4 rows


How can I change the above script to ensure that I get all of the result
sets returned by a stored procedure?

Thanks,
Glen Accardo
[EMAIL PROTECTED]

Reply via email to