<br>
<b>this is my program:</b><br><br>
use DBI;<br>
use Error qw(:try);<br>
#-<br>
my $username = "SCOTT";<br>
my $password = "TIGER";<br>
my $hostname = "192.168.0.14";<br>
my $dbh;<br>
my $sth;<br>
my $sql;<br>
#-<br>
try{<br>
$dbh =
DBI->connect('dbi:Oracle:host='.$hostname.';sid=ORCL;
port=1521;server=dedicated',
$username,$password,{RaiseError
=> 1,AutoCommit => 0});<br>
try{<br>
$sql =qq{ INSERT INTO PROVAXX VALUES('RICCARDO',
1) };<br>
$sth=$dbh->prepare( $sql );<br>
$sth->execute;<br>
print "n * insert ok n";
<br>
}otherwise{<br>
$dbh->rollback(); <br>
print "n * Error insert n";<br>
};<br>
$dbh->disconnect;<br>
}otherwise{<br>
print "n * Error
connect n";<br>
};<br>
--------------------------- <b>Result is:</b>
<br>
DBD::Oracle::st execute failed: ORA-00942: table or view
does not exist (DBD ERROR: error possibly near
<*> indicator at char 13 in ' INSERT INTO
<*>PROVAXX VALUES('RICCARDO', 1) ') [for
Statement " INSERT INTO PROVAXX VALUES('RICCARDO', 1)
"] at d:perljobpgm_3.pl line 17.<br>
<br>
* Error insert<br>
---------------------------
<b>I want this result:</b><br>
<br>
* Error insert<br>
---------------------------
To write a respons, access
http://ww
w.cpanforum.com/response_form/3606
To see the full thread, access
http://www.cpan
forum.com/threads/3603
--
You are getting this messages from www.cpanforum.com
To change your subscription information visit http://www.cpanforum.
com/mypan/
|