Newbie to Postgres - Urgent query

From: Ritu Khetan <ritu(at)netcore(dot)co(dot)in>
To: pgsql-general(at)postgresql(dot)org
Subject: Newbie to Postgres - Urgent query
Date: 2004-01-16 09:18:48
Message-ID: 1074244727.3623.13.camel@efv2.netcore.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

I am trying to use DBI in perl to connect to my Postgres database. I
am able to connect to the database but when any further queries are made
using the database handle, I see the following message in my error logs
and no results are generated -

"NOTICE: current transaction is aborted, queries ignored until end of
transaction block"

Please help on what could be going wrong.

Here's a part of my code :

$dbh = DBI->connect(DBI:Pg:dbname=dbname, $user_name, $password, {
RaiseError => 0, PrintError => 0, AutoCommit => 0});
my $results = "select * from user_regs order by id desc";
my $ids = $dbh->prepare($results);
my $sth = $ids->execute;

$iderr = $ids->errstr;
if ($iderr) {
print STDERR "Couldn't get usercount from user_regs";
exit 0;
}

my @resultrows = $ids->fetchrow_array;
my $rowcount = scalar(@resultrows);
print STDERR "Rowcount: $rowcount\n";
exit 0;

Need urgent response.

Regards,
Ritu

----------------------------------------------------------------

NETCORE SOLUTIONS *** Ph: +91 22 5662 8000 Fax: +91 22 5662 8134

MailServ and FlexiMail: Messaging Solutions: http://netcore.co.in

Pragatee: Integrated Server-Software Suite: http://www.pragatee.com

Emergic Freedom: Server-centric Computing: http://www.emergic.com

BlogStreet: Blog Profiles and RSS Ecosystem: http://blogstreet.com

Deeshaa: Rural Development: http://www.deeshaa.com

Rajesh Jain's Weblog on Technology: http://www.emergic.org
----------------------------------------------------------------

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2004-01-16 09:41:16 Re: how to catch the error in procedure ?
Previous Message Dennis Bjorklund 2004-01-16 08:58:57 Re: Index space reusable?