Re: execute called with an unbound placeholder
"Jasbinder Singh Bali" <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.dbdpg |
|---|---|
| Message-ID | <[email protected]> |
the final statement prepared is INSERT INTO tbl_ul_received (unmask_id,seq_no,received_id,received_from,received_by, received_via,received_with,received_for,received_date_time,received_comments) VALUES S (223, 1, 'localhost', '127.0.0.1', 'UnMask1.mshome.net', 'UnMask1.mshome.net', 'Tue, 1 Jan 2002 13:15:35 -0500 (EST)', 'ESMTP', 'g01IFZlU002773', '[email protected]' ) The table creation script for tbl_ul_received is as follows:- CREATE TABLE tbl_ul_header_received ( unmask_id int4 NOT NULL, seq_no int4 NOT NULL, received_id text, received_from text, received_by text, received_via text, received_with text, received_for text, received_date_time text, received_comments text, CONSTRAINT pk_received PRIMARY KEY (unmask_id, seq_no) ) WITHOUT OIDS; ALTER TABLE tbl_ul_header_received OWNER TO postgres; When this insert statement gets executed (in perl) using $query_tbl_ul_received->execute; it throws the following error DBD::Pg::st execute failed: execute called with an unbound placeholder at email_parser.pl line 566, <FILE> line 1. In my perl code, query is formed as follows:- my $query_tbl_ul_received = $dbh->prepare("INSERT INTO tbl_ul_received (unmask_id,seq_no,received_id,received_from,received_by,received_via,received_with,received_for,received_date_time,received_comments) VALUES (".$unmask_id.",".$count.",'".$id."','".$from_from."','".$by_domain."'',',".$with."','".$for."','".$date_time."','".$rcomm."')"); I'm kind of badly stuck with this problem and have no clue about its solution. A quick help would be highly appreciated. Thanks, Jas On 1/21/07, Andrew Dunstan <[email protected]> wrote: > Jasbinder Singh Bali wrote: > > Hi, > > > > I'm trying to insert following values in one my tables in potgres 8.2. > > > > 223, 1, localhost, 127.0.0.1, UnMask1.mshome.net, UnMask1.mshome.net, > > Tue, 1 Jan 2002 13:15:35 -0500 (EST), ESMTP, g01IFZlU002773, > > [email protected] > > > > Except for the first two fields (that happend to be int4 datatype), > > rest all the fields are of data type text. > > > > When this query gets executed using command > > > > $query_tbl_ul_received->execute; > > > > I get the followring error: > > > > DBD::Pg::st execute failed: execute called with an unbound placeholder > > at email_parser.pl line 561, <FILE> line 1. > > > > Can anyone please throw some light on it. > > > > > > not with this info - you need to show us the statement prepared and any > param bindings. > > cheers > > andrew > >