Quoting "Moreno, Javier" <[EMAIL PROTECTED]>: > Actually it is now getting worse. It has AutoCommit set to 0 so I am doing > this: > > $::sql = "UPDATE GLOBALSettings SET Lang = ?"; > $::crt = $::lang_code; > &Debug("About to prepare: $::sql with criteria: $::crt"); > $::sth = $::dbh->prepare($::sql) or &Error("Unable to prepare statement."); > $::rec = $::sth->execute ($::crt) or &Error("Unable to execute statement"); > $::dbh->commit;
As I recommended before, please add $DBI::errstr to your error messages, otherwise you get no clues about what went wrong. > But it is now writing a <NULL> value on the DB. That &Debug line shows: > > About to prepare: UPDATE GLOBALSettings SET Lang = ? with criteria: SP > > So the value is fine but it is not updating right. What I found was that the > second field on the SQL table was set to no nulls so the update was failing > on the webserver log because of that. BTW responding to the "app bombs" > ambiguity, I use the value for an auto META REFRESH value to find out the > directory of the language I am running. The problem may be in placeholder handling in the driver. Add `DBI->trace( 4, "log_file.log");` (without the outer quotes) before prepare() to get more information about what is happening. Higher numbers up to about 9 give you more details. http://search.cpan.org/~timb/DBI/DBI.pm#TRACING http://search.cpan.org/~timb/DBI/DBI.pm#trace http://search.cpan.org/~timb/DBI/DBI.pm#Why_doesn't_my_CGI_script_work_right? -- Mac :})