XSharpPublic icon indicating copy to clipboard operation
XSharpPublic copied to clipboard

[VFP] Cursor Operation REPLACE with FOR

Open MarioV-GH opened this issue 1 year ago • 3 comments

Describe the bug Support of Keyword FOR (xsharp-error)

To Reproduce Code to reproduce the behavior:

USING System
USING System.Collections.Generic
USING System.Text

FUNCTION check_cursor AS VOID

        create cursor abc (mkey i, mident c(10))
        insert into abc (mkey,mident) values (1,"a")
        insert into abc (mkey,mident) values (2,"b")
        insert into abc (mkey,mident) values (3,"c")

        create cursor def (mkey_fk i,mtext c(10))
        insert into def (mkey_fk,mtext) values  (1,"inf1")
        insert into def  (mkey_fk,mtext)  values (1,"inf2")
        insert into def  (mkey_fk,mtext)  values (2,"infA")

        insert into def  (mkey_fk,mtext)  values (3,"to_del")
        insert into def  (mkey_fk,mtext)  values (4,"to_del")


        select def
        replace  mtext WITH "newtext" FOR mkey_fk = 2

RETURN

Expected behavior Replacing all lines fulfilling the condition

MarioV-GH avatar Oct 02 '24 10:10 MarioV-GH

This is working in 2.21. I am not sure if it was working in 2.20

RobertvanderHulst avatar Oct 02 '24 13:10 RobertvanderHulst

ok, I just have the official one 2.20.0.3

MarioV-GH avatar Oct 02 '24 14:10 MarioV-GH

2.21 is not released. Will go into beta in a few days.

RobertvanderHulst avatar Oct 03 '24 10:10 RobertvanderHulst