in reply to DBI Question
$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...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI Question
by boodong (Novice) on Aug 25, 2011 at 19:29 UTC | |
by locked_user sundialsvc4 (Abbot) on Aug 26, 2011 at 14:12 UTC |