Hi Michael,

thanks for your reply.

Michael Peppler wrote:
> If the return status can be more than a fail/success value then I
> would fetch it in a normal fetch loop and check the result type
> (CS_STATUS_RESULT).

Is it reliable to use the string "COL(1)" to fetch that value
or will that string change in future versions of DBD::Sybase?


    $sth = $dbh -> prepare (sprintf 'insert_update_sub %s, %s',
                                    $dbh -> quote ($sub),
                                    $dbh -> quote ($path));
    $sth -> execute;

    do 
    {
        while ($href = $sth -> fetchrow_hashref)
        {
            if (CS_STATUS_RESULT == $sth -> {syb_result_types})
            {       
                $res = $href -> {'COL(1)'};

                # can I call "last;" here?
            }
        } 
    }       
    while ($sth -> {syb_more_results});


Also, if I call "last;" above, after I've found the needed value,
do I have to call "$sth -> finish" as well? I wonder, how is it 
done in DBD::Sybase: do you always return the CS_ROW_RESULT's first?
And all the other result types always follow after CS_ROW_RESULT's?

And if you haven't read all the CS_ROW_RESULTS, then you have
to call $sth -> finish. But if you haven't read all other results,
then you don't need to call the $sth -> finish, is it correct?

Thank you
Alex

Reply via email to