Skip to Content.
Sympa Menu

freetds - RE: [freetds] FAQ submission: multiple results for a single query

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] FAQ submission: multiple results for a single query
  • Date: Thu, 30 Oct 2003 11:41:23 -0800

On Thu, 2003-10-30 at 08:38, Castellano, Nicholas wrote:
> > -----Original Message-----
> > From: Garrett Goebel [mailto:garrett AT scriptpro.com]
> > Sent: Thursday, October 30, 2003 11:18 AM
> > To: 'FreeTDS Development Group'
> > Subject: [freetds] FAQ submission: multiple results for a single query

> > Multiple consecutive result sets example:
> >
> > o Perl
> >
> > use DBI;
> > my $dbh = DBI->connect(...);
> > my $sth = $dbh->prepare('select 1 select 2');
> > $sth->execute();
> > do {
> > while (my $data = $sth->fetch) {
> > $sth->execute($data->[0]);
> > }
> > } while ($sth->{odbc_more_results});
>
> The *_more_results stuff is specific to the DBD driver. If your DBI handle
> is backed by a DBD::Sybase object, you would need to use "syb_more_results"
> instead. I don't know of a good database-independent way of doing this.

DBI has $sth->more_results() that does the same thing (actually it's
grandfathered to be the same thing as $sth->{syb_more_results} IIRC).

Michael
--
Michael Peppler Data Migrations, Inc.
mpeppler AT peppler.org http://www.mbay.net/~mpeppler
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
long term contract positions - http://www.mbay.net/~mpeppler/resume.html




Archive powered by MHonArc 2.6.24.

Top of Page