|
|
Choosing A Webhost: |
RE: FAQ submission: multiple results for a single query: msg#00260db.tds.freetds
On Thu, 2003-10-30 at 08:38, Castellano, Nicholas wrote: > > -----Original Message----- > > From: Garrett Goebel [mailto:garrett@xxxxxxxxxxxxx] > > 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@xxxxxxxxxxx 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
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | AW: slow connection to mssql 7.0, roland bole |
|---|---|
| Next by Date: | RE: FAQ submission: multiple results for a single query, Castellano, Nicholas |
| Previous by Thread: | RE: FAQ submission: multiple results for a single query, Castellano, Nicholas |
| Next by Thread: | RE: FAQ submission: multiple results for a single query, Bort, Paul |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |