$dbh = $dbh->prepare("INSERT INTO vindbase_operator.mobily_vb_ +script_worklistv2 (worklistid, emstype, submitserver, submitdate, sub +mitowner, state, contents, contentscksum) VALUES (vindbase_operator.m +obily_vb_script_worklist_inc.nextval,?,?,to_date(?,'YYYY-MM-DD H H24:MI:SS'),?,?,?,?)");
The aove cited code looks suspicious to me. You are reassigning your database handle as a statement handle and then trying to treat it as a database handle again later on in your code.
When using DBI I normally use another variable as my statement handle thusly:
and then hopefully life goes on as normal. Use the $sth to execute your insert.my $sth = $dbh->prepare("INSERT INTO vindbase_operator.mobily_vb_ +script_worklistv2 (worklistid, emstype, submitserver, submitdate, sub +mitowner, state, contents, contentscksum) VALUES (vindbase_operator.m +obily_vb_script_worklist_inc.nextval,?,?,to_date(?,'YYYY-MM-DD H H24:MI:SS'),?,?,?,?)") or die $dbh->errstr;
That's just the first thing that leaps to my attention...
In reply to Re: DBI Question
by blue_cowdawg
in thread DBI Question
by boodong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |