Subject RE: [IBO] A problem with a procedure
Author Malcolm Smith
Helen, thanks for the response.

I'm still quite new to all this (and do it very infrequently).

My 'common source code' is used by SQL routines that potentially return more
than one record. I made an incorrect assumption that my one-and-only-one SP
would work the same. In the original code posted I determine if there are
any records by checking for Eof after the call to First().

How do I check if the one-and-only-one SP has actually returned any data ?

Am I suppose to check against the initialized values for a change ?

danieL and myself have your book passing across the table each day. We both
thank you for your efforts and lengthy responses.

Malcolm Smith
MJ Freelancing
Borland Technology Partner

Contributing Editor
C++Builder Developers Journal
FREE issue:

-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Monday, 29 November 2004 14:40
Subject: RE: [IBO] A problem with a procedure


I'll insert my comment here as I know Jason won't answer this until
tomorrow, due to Sabbath observance...

At 12:34 PM 29/11/2004 +1100, you wrote:


-- if you want a one-and-one-only row set returned (as the architecture of
your SP dictates) then you use EXECUTE PROCEDURE in your SQL property and
you call Execute to execute it. After that, read Fields[], which is a
single TIB_Row. There is no cursor associated with an executable SP, hence
the error you are getting by calling First().

>For now I'll have to use the SQL statement as indicated above.

Really, you only have to call the correct methods...and DO make sure that
you initialise the return arguments. Inside the procedure, they are just
variables. PSQL doesn't do any magic in this respect...


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.802 / Virus Database: 545 - Release Date: 26/11/2004