my $dbh = DBI->connect("dbi:Oracle:host=1xx.1x1.130.131;sid=xxxx;port=1521", $user_id, $passwd,{RaiseError=>1} ) || die "can NOT connect";
其中RaiseError的作用在于当execute sql时如果出现错误则丢至上层,而不退出程序
my $dbh = DBI->connect("dbi:Oracle:host=1xx.1x1.130.131;sid=xxxx;port=1521", $user_id, $passwd,{RaiseError=>1} ) || die "can NOT connect";
其中RaiseError的作用在于当execute sql时如果出现错误则丢至上层,而不退出程序