The DROP Table is likely failing because the table has already been dropped.
One thing I noticed is that you set p1 to pippo using single quotes and p2 to não using double quotes. Not sure if that would be preserved when swapping out the parameters, but I would try using single quotes for defining both parameters. I would also first try seeing if the query worked in non-parameterized form, i.e. " UPDATE my_table SET field_2 = 'não' WHERE field_2 = 'pippo'". It would help if we could look at exactly what line 66 in the script looks like. -----Original Message----- From: marcos rebelo [mailto:ole...@gmail.com] Sent: Wednesday, April 06, 2011 6:12 AM To: Paul Johnson Cc: beginners@perl.org Subject: Re: Oracle nightmare The error continues: DBD::Oracle::db do failed: ORA-00942: table or view does not exist (DBD ERROR: error possibly near <*> indicator at char 11 in 'DROP TABLE <*>my_table') [for Statement "DROP TABLE my_table"] at script.pl line 31. ( n�o, não ) nok DBD::Oracle::st execute failed: ORA-00932: inconsistent datatypes (DBD ERROR: error possibly near <*> indicator at char 40 in 'UPDATE my_table SET field_2 = :p1 WHERE <*>field_2 = :p2') [for Statement "UPDATE my_table SET field_2 = ? WHERE field_2 = ?" with ParamValues: :p1='pippo', :p2="não"] at script.pl line 66. DBD::Oracle::st execute failed: ORA-00932: inconsistent datatypes (DBD ERROR: error possibly near <*> indicator at char 40 in 'UPDATE my_table SET field_2 = :p1 WHERE <*>field_2 = :p2') [for Statement "UPDATE my_table SET field_2 = ? WHERE field_2 = ?" with ParamValues: :p1='pippo', :p2="não"] at script.pl line 66. Best Regards Marcos On Wed, Apr 6, 2011 at 12:07, Paul Johnson <p...@pjcj.net> wrote: > On Wed, Apr 06, 2011 at 10:24:37AM +0200, marcos rebelo wrote: >> Hi all >> >> I have already lost one day around coding and documentation with this >> problem, so I'm asking for help with DBD::Oracle. >> >> I'm working around the unicode and BLOB problem. Can someone help me >> setting the fooling code running and correctly undling the Unicode >> part >> >> use strict; >> use warnings; >> use v5.10; >> >> use utf8; >> >> use DBD::Oracle qw(ORA_BLOB ORA_CLOB SQLT_CHR SQLT_BIN); >> use DBI; >> use Data::Dumper; >> >> local $ENV{'ORACLE_HOME'} = ( $ENV{'ORACLE_HOME'} || >> '/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/' ); >> local $ENV{'NLS_LANG'} = "AMERICAN_AMERICA.AL32UTF8"; > > I don't have Oracle around to test, but I beleieve the problem (or, at > least, a problem) is that these environment variables are being set too > late. Put them in a BEGIN block, move them up to before you use > DBD::Oracle, and lose the local keyword. > > Alternatively, get rid of those lines completely, and set up environment > appropriately before invoking perl. > > Good luck, > > -- > Paul Johnson - p...@pjcj.net > http://www.pjcj.net > -- Marcos Rebelo http://www.oleber.com/ Milan Perl Mongers leader https://sites.google.com/site/milanperlmongers/ Webmaster of http://perl5notebook.oleber.com -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/