Re: error using _variable in open cursor statement

Mike Aubury <[email protected]> Sat, 12 Jun 2021 13:08:07 +0100
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <CAGAq4WGpxn2BbFr8EwdOfpGmDP32-LVxEqw5xWHrjZR1sP+BCw@mail.gmail.com>
Its just "OPEN" not "OPEN CURSOR"

<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Sat, 12 Jun 2021 at 12:56, Iwan AB <[email protected]> wrote:

> Hi,
>
> I try this example taken from
> http://www.aubit.com/aubit4gldoc/manual/html/aubit_4gl_enhancements.html#PAUSE%20Screen%20Handling
>
> Passing IDs to functions
> module1.4gl:
>
> DECLARE c1 CURSOR FOR SELECT * FROM systables
> CALL open_cursor("module1:c1")
>
> anymod.4gl:
>
> FUNCTION open_cursor(p_cursor)
>     DEFINE p_cursor CHAR(20)
>
>     OPEN CURSOR _variable(p_cursor)
>
>     IF SQLCA.SQLCODE!=0 THEN
>         ERROR "There was some error opening the cursor!"
>     END IF
>
> END FUNCTION
>
> but compiling anymod.4gl, I got error like this
>
> DATABASE testdb
> FUNCTION open_cursor(p_cursor)
>     DEFINE p_cursor CHAR(20)
>
>     OPEN CURSOR _variable(p_cursor)
> |________________________________^
> | Error at line 5, character 34
> | syntax error, unexpected '_variable'  (_variable)
>
>     IF SQLCA.SQLCODE!=0 THEN
>         ERROR "There was some error opening the cursor!"
>     END IF
>
> END FUNCTION
>
>
> Regards,
>
> Iwan
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virus-free.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
> <#m_2073229092495903396_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss