This is easily done as long as you only plan to use the cursor in one
module of your program (impossible otherwise).
Informix only requires that your "DECLARE" your cursor above any references
to it (quirky, but true I think even in ESQL/C....it's been a while since I
had that problem in EC, but I recently saw it in a 4GL).
There is no need to pass a cursor to different functions. If you would
like your cursor to be in a module all by itself, but be used by other
modules, you will need to implement other functions in the "cursor" module
to fetch (and close and free, if you are into completeness) the cursor.
djboyd@sam.on-net.net wrote:
> I need some example code on how one can create a cursor and then pass
> it to different functions. Currently all my logic sits in void main
> (void). I would like to break this up to make my code more
> manageable.
> ...
> TIA
>
> On Mon, 23 Mar 1998 17:09:40 -0800, "David Coburn"
> <dcoburn@worldvision.org> wrote:
>
> >
> >
> >>Not sure if this is the correct news group to ask for help using
> >>ESQL/C w informix.
> >
> >This will work. What't the question? No guarantees on the answer, of
> >course. . .
> >
> >DAvid
> >
> >
--
- Danny Wright
danwright@nospam.com
to reply by email, replace the "nospam" with "bigfoot".
No headhunters please...
#include <stddisclaimers.h>