DBI; error in $handle->execute()

DBI; error in $handle->execute()

am 04.12.2007 11:21:31 von Yakov

If DBI's $handle->execute() returned error, do I need to call $handle-
>finish() ?

Yakov

Re: DBI; error in $handle->execute()

am 04.12.2007 16:59:56 von glex_no-spam

Yakov wrote:
> If DBI's $handle->execute() returned error, do I need to call $handle->finish() ?

You rarely need to call finish, however no you don't need to call
finish. If your execute returns an error you'd likely want to die
and there wouldn't be anything in $handle to finish().

perldoc DBI

finish

$rc = $sth->finish;

Indicates that no more data will be fetched from this statement
handle before it is either executed again or destroyed. The finish
method is rarely needed, but [...]