Re: Problem with Postgres V 8 and DBI maybe
| От | Michael Fuhr |
|---|---|
| Тема | Re: Problem with Postgres V 8 and DBI maybe |
| Дата | |
| Msg-id | 20050125232108.GB96518@winnie.fuhr.org обсуждение исходный текст |
| Ответ на | Problem with Postgres V 8 and DBI maybe (David Siebert <david@eclipsecat.com>) |
| Список | pgsql-general |
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/
В списке pgsql-general по дате отправления: