I'm running ActiveState Perl 5.6, DBI 1.34, DBD::Oracle 1.06.  The 
database is Oracle 8.1.7, running on an NT 4.0 server.  (No budget for 
an upgrade to W2K or solaris this year. :-/)

I have a simple query that, when run via Oracle SQL*Plus returns 38947 
rows.

If I run the query using Activestate/DBI/DBD, I get 187 rows.  Does DBI 
buffer results?

Here is the script, with the original query:

----
use DBI;

$port = "1521";
$host = "myhost.mydomain.com";
$sid = "LYST";
$user = $passwd = $ARGV[0];
$dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid;port=$port", $user, 
$passwd) || die "Unable to connect to host $host SID $sid on port 
$port\n";

$query = 'SELECT id FROM solution_container';

$sth = $dbh->prepare($query);
print $sth->errstr; print "\n";
if (($num_rows = $sth->execute() || die "Unable to select") < 0) {
                print "No rows selected.\n";
                exit(1);
        }
print "Number of rows: $num_rows\n";
$sth->finish();
exit(0);


-----
John Costello   cos AT indeterminate DOT net
"Bomb!  I order you not to explode!"--Dark Star

Reply via email to