Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Select Multiple Form Field via Perl into Oracle error
Hi,
Apologies for submitting this to both groups but I'm relatively new to Oracle and i'm not sure which is relevant to this problem - it may even be an HTML thing although i probably need a Perl line or an SQL statement to rectify it:-).
I have a web Form with a select multiple attribute which Perl takes and sends to an Oracle 8.1 table 'news'. If i select 1 item its fine...if i select more than one i get:
DBD::Oracle::db prepare failed: ORA-01756: quoted string not properly terminated (DBD ERROR: OCIStmtPrepare) at news.pl line 855.
....although my perl script suggests there is nothing unusual about the multiple FORM string, i have a sneaking suspicion that there's a funny character in there that i need to remove in the Perl script before Inserting into my table.
Anyone come across this before? - i cant seem to find anything that sugegsts there *is* a character in there but....
An example string i'm writing incidentally is:
$categories_selected = $FORM{'categories'};
$SQL1 = "INSERT into news (type) VALUES ('$categories_selected')";
my $sql = qq{ $SQL1 };
my $sth=$dbh->prepare( $sql );
$sth->execute();
where $FORM{'categories'} is "ProductsServicesContacts" (3 options from multiple list form - selecting just one inserts ok)
Any help much appreciated
Ian Received on Wed Aug 25 1999 - 18:51:06 CDT
![]() |
![]() |