You are fetching off the end of a cursor so you would expect an error on any sql
Would be the same sort of thing as
my @test= (1,2);
print $test[100];
If you know your recordset will be small I would use fetchall_arrrayref or
fetchall_hashref rather than just fetch.
The normal
On 04/02/14 19:36, David Nicol wrote:
$price_sth-execute;
my ($o_file_price) = $price_sth-fetchrow_array();
if ($price_sth-fetch) {
$this-log_error('ERROR: scalar select returned second row at
%s line %d', __FILE__, __LINE__);
}
I expected the fetch to return
, 5 Feb 2014 13:25:03 +
From: martin.ev...@easysoft.com
To: davidni...@gmail.com; dbi-users@perl.org
Subject: Re: Surprising DBD::Oracle error raised
On 04/02/14 19:36, David Nicol wrote:
$price_sth-execute;
my ($o_file_price) = $price_sth-fetchrow_array();
if ($price_sth-fetch
: Surprising DBD::Oracle error raised
On 04/02/14 19:36, David Nicol wrote:
$price_sth-execute;
my ($o_file_price) = $price_sth-fetchrow_array();
if ($price_sth-fetch) {
$this-log_error('ERROR: scalar select returned second row at
%s line %d', __FILE__, __LINE__);
}
I
In message cafwsco-tqp5yycpptawzqkkyhz6qjs3d_g+yv5r9x9apdbm...@mail.gmail.com
, David Nicol writes:
the error message claimed I hadn't executed the statement.
Where is your DBI_TRACE?
I can't reproduce.
John
groenv...@acm.org
use strict;
use DBI;
my $dbh = DBI-connect( dbi:Oracle:, scott,
On Wed, Feb 5, 2014 at 7:25 AM, Martin J. Evans
martin.ev...@easysoft.com wrote:
That is indeed interesting. When I run the following with DBD::ODBC to MS
SQL Server:
use strict;
use warnings;
use DBI;
my $h = DBI-connect();
eval {
$h-do(q/drop table mje/);
};
$h-do(q/create
On 05/02/14 14:08, David Nicol wrote:
On Wed, Feb 5, 2014 at 7:25 AM, Martin J. Evans
martin.ev...@easysoft.com wrote:
That is indeed interesting. When I run the following with DBD::ODBC to MS
SQL Server:
use strict;
use warnings;
use DBI;
my $h = DBI-connect();
eval {
$h-do(q/drop
In message CAFwScO-0DchsbSLPSmR9JY+KmBUF3BfUREH9XdDSVgEAo=p...@mail.gmail.com
, David Nicol writes:
$price_sth-execute;
my ($o_file_price) = $price_sth-fetchrow_array();
if ($price_sth-fetch) {
$this-log_error('ERROR: scalar select returned second row at
%s line %d', __FILE__,
the error message claimed I hadn't executed the statement.
I changed it to
if (eval { $price_sth-fetch}) {
$this-log_error('ERROR: scalar select returned second row at
%s line %d', __FILE__, __LINE__);
}
but I think I'll change it again to
if ($price_sth-{Active} and