in reply to Re^3: INSERT NOT EXECUTING
in thread INSERT NOT EXECUTING

OK, with the strict and warning, I have now: Died at Monk.pl line 67 (#2) (F) You passed die() an empty string (the equivalent of die "") or you called it with no args and $@ was empty. Uncaught exception from user code: Died at Monk.pl line 67.

Replies are listed 'Best First'.
Re^5: INSERT NOT EXECUTING
by Corion (Patriarch) on Aug 05, 2013 at 21:08 UTC
      All the changes have been made, with the following output from a debugger: Use of uninitialized value $data{"A\34bid"} in join or string at C:\Users\CJP2\AppData\Local\Temp\dzprltmp.pl line 68 (#1)(W uninitialized) An undefined value was used as if it were already defined. It was interpreted as a "" or a 0, but maybe it was a mistake.To suppress this warning assign a defined value to your variables. To help you figure out what was undefined, perl will try to tell you the name of the variable (if any) that was undefined. In some cases it cannot do this, so it also tells you what operation you used the undefined value in. Note, however, that perl optimizes your program anid the operation displayed in the warning may not necessarily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer to the concatenation (.) operator, even though there is no . in your program. Use of uninitialized value $data{"A\34ask"} in join or string at C:\Users\CJP2\AppData\Local\Temp\dzprltmp.pl line 68 (#1)Uncaught exception from user code: DBI::st=HASH(0x30b0e78)->errstr at C:\Users\CJP2\AppData\Local\Temp\dzprltmp.pl line 69.
        Uncaught exception from user code: DBI::st=HASH(0x30b0e78)->errstr
        It seems you are calling a method in double quotes. Double quotes interpolate some expressions, but not method calls. Do not use double quotes for the errstr method:
        die $DIVDATA->errstr;
        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
        If, with RaiseError => 1 on the connect, you really do get the error "Died at Monk.pl line 67." (on the execute of the insert), then I'd see if the latest version of DBI and DBD::mysql were installed, and then I'd think about reporting a bug in the DBD::mysql library. Even without RaiseError set, an error message should be printed to STDOUT (because PrintError is set by default), so there really should be some better indication of what's wrong. But before filing that report, cut your code down to just the bare minimum of prepare and execute of the insert with the data that it gets executed with, and see if you get the same (lack of) error.