Search Postgresql Archives

Re: Problem with Postgres V 8 and DBI maybe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 25, 2005 at 05:49:11PM -0500, David Siebert wrote:

> I am trying to add records to a table in DBI and I keep getting an error  7
> The exact error is DBD::Pg::st execute failed:  at connect.pl line 107.
> ERROR!!! (7) INSERT INTO phonegroups VALUES ('TECHIES',1, 1)

Hmmm...I don't think DBI or DBD::Pg prints errors like "ERROR!!! (7)".
Are you doing your own error checking and only looking at $DBI::err?
What does $DBI::errstr say?

Have you tried to reduce the problem to the smallest amount of code
necessary to reproduce the problem?  Something like this:

my $dbh = DBI->connect($source, $user, $password, {RaiseError => 1});
my $sth = $dbh->prepare("INSERT INTO phonegroups VALUES (?, ?, ?)");
$sth->execute("TECHIES", 1, 1);
$dbh->disconnect;

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux