To be more precise about the "both" comment
GrandFather made, the Perl error is caused by the error DBD::ODBC is reporting.
The prepare fails, and that failure returns undef. The execute can't be performed on the statement handle because the statement handle is undefined.
DBD::ODBC is, in fact, reporting that there is a syntax error in the INSERT INTO statement and that it got a failure back fro the database server for that reason. Either the syntax of $FinalInsertSQL is wrong in general or one of the variables concatenated to form it is wrong, undefined, or empty.
Getting your debugging on is a good idea. The database server doesn't appear to give very helpful error hints other than the fact that it is a syntax error in the INSERT statement.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.