From: "Condle, Joseph P" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 08, 2002 12:27 Subject: Web Based Form with DBI
> I am trying to input data from an html form. I can insert data from a straight > dbi script without a problem. I can get data from the form without having the > dbi piece. But I can not merge the two and get it to work. When I run the > following script I get the following errors but the record get inserted into my > database. The printf's are to see whethere I have data or not. According to > the files written I do not have data, but I am still inserting a recored. > > I am running Perl 5.6.1, solaris 8, Oracle 8.17, DBI1.21 and DBD 1.12. This is > my first DBI web form script. > > The Errors > > From the html form netscape Error The document contained no data. Try again > later, or contact the server's administrator > > The error_log of the apache web server > Printf() on closed filehandle JOE at insert.pl line 59. > Printf() on closed filehandle JOE at insert.pl line 61. > Printf() on closed filehandle JOE at insert.pl line 62. > Printf() on closed filehandle JOE at insert.pl line 63. > Printf() on closed filehandle JOE at insert.pl line 64. > Vilolated (DBD ERROR: OCIStmtExecute at insert.pl line 77 > > Issuing rollback() for database handle being destroyed without explicit > disconnect(). > > open(DAN, "> postOra.txt"); > printf JOE "ssn %s is %s \n",$ssn; > printf JOE "fname %s is %s \n",$fname; > printf JOE "lname %s is %s \n",$lname; > printf JOE "city %s is %s \n",$city; > printf JOE "state %s is %s \n",$state; > printf JOE "zip %s is %s \n",$zip; > close(DAN); I'm a little superstitious, but I've always preferred to print to the same handle I opened. Did you plan to put an eval{} block around the DBI calls? I don't see any reason to look at $@ otherwise. -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age.