I have written a cgi script that allows the users to ftp a file over to the server, loads the contents into a table and then uses these values to update another table.
The ftp and data load is working really well and quickly. However, when I issue the update statement the program just hangs and eventually gives me a "server cannot be found" error.
If I comment out the update statement then the program works again without any issues.
My test is only trying to update ten records, which when executed via regular sql plus performs normally (i.e. quickly).
I define the update statement through an if statement and then issue:
$sth=$dbh->do("$sql")||
&error("Unable to perform update statement:<br /><br />$sql<br /><br /
+>$DBI::errstr\n");
$updated=$sth->rows;
$dbh->commit;
After commented out the update statement, I printed $sql to the screen. The syntax is correct as runs as is in sqlplus.
Any ideas or suggestions?
Thanks. Tony
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.