XSharpPublic icon indicating copy to clipboard operation
XSharpPublic copied to clipboard

[VFP] Cursor operation - SQL SELECT with Functions

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

Describe the bug xsharp-error when using SQL Select into with functions

To Reproduce Code to reproduce the behavior:

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

FUNCTION check_cursor AS VOID
        * 1. works fine:
        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 abc.*,cast(mtext+"x" as m) minfo_long FROM abc INTO cursor ghi
        SELECT abc.*,udf_getstring() str FROM abc into cursor ghi
RETURN
ENDFUNC

FUNCTION udf_getstring()
        LOCAL cString AS STRING
        cString = sys(2015)
        RETURN cString
ENDFUNC

Expected behavior Full Support of vfp-sql-select

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