Up Prev Next
From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Re: Obtaining rowcount when updating
Date: Sep 29 1998 3:22PM
David C Worenklein writes:
> >>>>> "Michael" == Michael Peppler writes:
> Michael> Simon Yaminian writes:
> Michael> Perfectly normal.
> Michael> The first dbresults() is for the actual insert, and on an
> Michael> insert there are no rows, so dbnextrow() returns an empty
> Michael> array. The second call to dbresults() will return
> Michael> NO_MORE_RESULTS (if there was only one insert statement).
> Michael> YOu get the number of rows affected with DBROWS.
> Watch out for insert triggers - they can trigger dbresults.
I knwo they used to (I got bitten by that back in 1989 - on 4.01 :-),
but I had a feeling that this was not the case in more recent versions
Notwithstanding the above statement (how's that for pedantic :-) you
should *always* call dbresults() in a loop until it returns
Michael Peppler -||- Data Migrations Inc.
email@example.com -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com