http://qs321.pair.com?node_id=532064


in reply to error trapping problem

Executing that script via DBD::Sybase would be a lot easier to trap the errors.

That's pretty straightforward - you just need to read in the file and split it on the \ngo\n. Then submit each SQL block with a loop:

$sth = $dbh->prepare($sql); do { while(my $row = $sth->fetch) { print "@$r\n"; } } while($sth->{syb_more_results});
Michael