Subject | Re: [IBO] TIB_Cursor not returning correct result |
---|---|
Author | sgharp |
Post date | 2004-08-25T16:02:50Z |
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
qry.Open;
qry.First;
and it still returns zero. Do you have any other ideas? BTW, I use
TIB_Cursor in several places and haven't ever seen anything like
this.
Steve
> At 03:24 PM 25/08/2004 +0000, you wrote:query
> >Hi All,
> >
> >I have a strange problem that's got me stumped. I'm executing a
> >stored procedure that populates some fields in a table. Next, I'm
> >using a TIB_Cursor to query a numeric field in the table. The
> >is returning a zero which is incorrect.as
> >
> >Now the kinky part. I can stop the debugger (breakpoint) as soon
> >the query returns the zero and cut and paste the SQL statementinto
> >IBExpert and execute it. The query executed in IBExpert returnswould
> >14.09 which is correct.
> >
> >The stored procedure mentioned above empties the table and then
> >populates it with calculated values. It works fine and generates
> >the numbers correctly. I don't understand why the TIB_Cursor
> >return a different result than IBExpert with exactly the samequery
> >at the same point in time.arrive
>
> You aren't meant to call Open on TIB_Cursor, since nothing will
> until the first Fetch is called. Open is a method of the datasetthe wire
> buffer. TIB_Cursor doesn't have one.
>
> Always call First to "open" a TIB_Cursor. Then it will shout down
> at the SP "send me what you're holding for me over there." Whilethe TIB_C
> is busy doing its thing with that row, the SP will resumeexecuting and
> generate another row.a row,
>
> The same holds for TIB_C's over real datasets. Call First to get
> then call Next to get another one.Thanks Helen but that didn't do it. I changed the code to
qry.Open;
qry.First;
and it still returns zero. Do you have any other ideas? BTW, I use
TIB_Cursor in several places and haven't ever seen anything like
this.
Steve