To Christian Merz:
I'm executing this 1000's of times in the actual code, that is why I've
prepared the query rather than passing in the sql string every time.

For now I am just calling execute(), fetchrow_array(), and finish()
explicitly.

Below find the trace output:

On Thu, Apr 10, 2008 at 7:54 AM, Tim Bunce <[EMAIL PROTECTED]> wrote:
>
> On Wed, Apr 09, 2008 at 04:29:48PM -0700, Douglas Wilson wrote:

with trace(9)

$dbh->trace(9);
>  > my $total;
>  > ( $total ) = $dbh->selectrow_array( $sth, undef, $id );
>  > ( $total ) = $dbh->selectrow_array( $sth, undef, $id );

>  A DBI trace should shed more light on it.

trace output:
     DBI::db=HASH(0x401aae68) trace level set to 0x0/9 (DBI @ 0x0/0)
in DBI 1.602-nothread (pid 1812)
    -> selectrow_array for DBD::Sybase::db
(DBI::db=HASH(0x401aaef8)~0x401aae68 DBI::st=HASH(0x401ab0d8) undef
10600)
bind :p1 <== '10600' (attribs: )
       bind :p1 () <== 10600 (size 5/8/0, ptype 6, otype 0)
       bind :p1 <== '10600' (size 7, ok 1)
       datafmt: type=8, name=, status=256, len=4
       saved type: 8
    cmd_execute() -> ct_send() OK
    cmd_execute() -> set inUse flag
    st_next_result() -> ct_results(4040) == 1
    ct_res_info() returns 1 columns
    STORE DBI::st=HASH(0x401ab0d8) 'NUM_OF_FIELDS' => 1
    ct_describe(0): type = 10, maxlen = 8
    describe() -> col 0, type 10, realtype 10
describe() retcode = 1
    st_next_result() -> lasterr = 0, lastsev = 0
    dbih_setup_fbav alloc for 1 fields
    dbih_setup_fbav now 1 fields
    syb_st_fetch() -> ct_fetch() = -204 (0 rows, 1 cols)
    st_next_result() -> ct_results(4046) == 1
    st_next_result() -> ct_results(4047) == 1
    st_next_result() -> ct_results(4046) == 1
ct_results(4046) final retcode = -205
    st_next_result() -> lasterr = 0, lastsev = 0
    st_next_result() -> got CS_CMD_DONE: resetting ACTIVE,
moreResults, dyn_execed, exec_done
    clear_sth_flags() -> resetting ACTIVE, moreResults, dyn_execed, exec_done
    clear_sth_flags() -> reset inUse flag
    syb_st_fetch() -> st_next_results() == 4046
    clear_sth_flags() -> resetting ACTIVE, moreResults, dyn_execed, exec_done
    clear_sth_flags() -> reset inUse flag
    <- selectrow_array= ( ) [0 items] at ./tst line 22
    -> selectrow_array for DBD::Sybase::db
(DBI::db=HASH(0x401aaef8)~0x401aae68 DBI::st=HASH(0x401ab0d8) undef
10600)
bind :p1 <== '10600' (attribs: )
       bind :p1 () <== 10600 (size 5/8/7, ptype 6, otype 0)
       bind :p1 <== '10600' (size 7, ok 1)
       datafmt: type=8, name=, status=256, len=4
       saved type: 8
    cmd_execute() -> ct_send() OK
    cmd_execute() -> set inUse flag
    st_next_result() -> ct_results(4040) == 1
Can't locate object method "DELETE" via package "DBI::st" at ./tst line 23.
!   -> DESTROY for DBD::Sybase::db (DBI::db=HASH(0x401aae68)~INNER)
    syb_db_disconnect() -> ct_close()
!   <- DESTROY= undef during global destruction

Reply via email to