[rochester-pm-list] Check This :)

Fred Edmister fedm at pkcommunications.com
Thu Dec 2 13:03:38 CST 1999


	Thanks Pat... It ended up being that I was using "sth->end();" instead of
"sth->finish;"  :)  That part is done now... YIPPIE!!   Now the server is
having trouble... I can do everything just hunkey dorey if I run the script
from a dos window (ie perl mydb.pl) but when implimented to the form, and
through http it just times out.. :(  So I'm debugging that now.. :)  Thank
you all for everything!!  :)

	Fred

At 01:57 PM 12/2/99 -0500, you wrote:
>2 things
>
>1) you can always check DBI->errstr
>2) I think Oracle requires a commit statement, $dbh->commit right before
the disconnect should do it.
>2a) Or use {AUTOCOMMIT=>1} in the connect statement
>
>
>Good Luck!
>
>--Pat
>
>
>On Thu, Dec 02, 1999 at 10:25:12AM -0500, Fred Edmister wrote:
>> 	Here's the code I'm using this morning... SO close... Please tell me why
>> it doesn't write the info in... :)  Anyone know?  
>> 
>> {begin code}
>> use DBI;
>> 
>>         my $dbh = DBI->connect('DBI:Oracle:pkcom2','test1','tiger1')
>>                 or die "Couldn't connect to database: " . DBI->errstr;
>> 	my $sth=$dbh->prepare('INSERT INTO perl_test (fname,lname,pwd) VALUES
>> (?,?,?)')
>> 	     	or die "Couldn't Connect To Database: " . DBI->errstr;
>> 
>> 	  print "Enter First Name>";
>> 	  my $fname = <>; chomp($fname);
>> 	  print "Enter Last Name>";
>> 	  my $lname = <>; chomp($lname);
>> 	  print "Enter Password>";
>> 	  my $pwd = <>; chomp($pwd);
>> 
>> 	$sth->execute($fname,$lname,$pwd);
>> 
>> 	$sth->end;
>> 	$dbh->disconnect;
>> {end code}
>> 
>> 	Thank you all in advance!
>> 
>> Fred
>> 
>> 
>
>




More information about the Rochester-pm mailing list