in reply to Re^2: Getting MSSQL message return on DBI
in thread Getting MSSQL message return on DBI
I am not sure I understand your question. But if you are wondering how to get the results of a statement handle with multiple result sets you should have code like:
If your question is about the error still, then you need to read perldoc DBI and DBD::ODBC for more specifics on how errors are handled an some suggestions on methods to do that. There are some additional flags you can set in both the db handle such as { RaiseError=> 1 } and in the statement handle. In general a common error handle method is to wrap your calls in eval {}; and check $@.my @rs; #result set do { while( my $hr = $sth->fetchrow_hashref ){ push @rs, $hr; } #process @rs (array of hashrefs in order the server returned them ) } while ( $sth->{odbc_more_results} );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Getting MSSQL message return on DBI
by shonorio (Hermit) on Oct 30, 2005 at 18:49 UTC |
In Section
Seekers of Perl Wisdom