I would advise to 'use strict;' but also to 'RaiseError => 1'. This will show you the $DBI::errstr (the error encountered).
You'd normally enclose the DBI-calling code in a eval block:
eval { yourDBIsubroutine() }; if ($@) { print "error:\n$@\n" }
From the DBI docs:
If you turn "RaiseError" on then you'd normally turn "PrintError" off. If "PrintError" is also on, then the "PrintError" is done first naturally).
(Try 'perldoc DBI' on the commandline)
In reply to Re: Insert into database table
by erix
in thread Insert into database table
by curtisb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |