From: | "Simon Crute" <simon-news(at)nospam(dot)geordie(dot)demon(dot)co(dot)uk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Problems on inserting with DBD::Pg |
Date: | 2001-05-08 19:32:00 |
Message-ID: | 989350524.9919.0.nnrp-08.9e981bad@news.demon.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I'm using perl 5.6, DBD::Pg with Peter's patch to enable full error
messages (Thanks !!) and I'm having a problem doing an insert. Here's the
extracts of code.
here's the prepare of the statement handle.
$sth_insert = $dbh->prepare("INSERT INTO PEOPLE (userid, title, fname,
sname, email, add_house, add_street, add_area, add_town, add_county,
dd_country, add_code, tel1, tel2, fax, sms, preferred_contact,
registered_date, last_logon_date)
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,SYSDATE,SYSDATE)")
or die "<p> unable to prepare statement /n<p> $DBI::errst<p></body></html>";
then later the execute
$sth_insert->execute($userid,$title,$forename,$surname,$email,$house,$street
,$blankadd,$town,$county,$country,
$pcode,$tel1,$tel2,$fax,$sms,$preferred_contact) or die "<p> unable to
insert statement /n<p> $DBI::errstr<p></body></html>";
The error message reported is
[Tue May 8 20:25:27 2001] newuser.plx: DBD::Pg::st execute failed: ERROR:
parser: parse error at or near "ail" at /......./cgi/newuser.plx line 161.
Now, line 161 is the execute line. The only occurrences of "ail" (without
the quotes) anywhere near that line is in $email.
Anyone any ideas why it's failing there ? (the basic code worked when we
were using DBD::Oracle, all we've changed is the connect and dbh->prepare
code)
Thanks.
(full versions.
Perl 5.6
Redhat 6.2 based system (2.2.14-5.0)
postgres 7.1
DBD::Pg .98 + patch
DBI 1.14
)
From | Date | Subject | |
---|---|---|---|
Next Message | Fran Fabrizio | 2001-05-08 20:06:39 | ALTER COLUMN |
Previous Message | Edmund Mergl | 2001-05-08 19:20:35 | Re: DBD::Pg errstr method doesn't return full error messages |