[rochester-pm-list] Check This :)
Fred Edmister
fedm at pkcommunications.com
Thu Dec 2 09:25:12 CST 1999
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