scatter error Message=Conversion Error from USUAL (STRING) to LOGIC
Hello guys, this is new error
1st. create a new FoxPro console application
USING System
USING System.Collections.Generic
USING System.Linq
USING System.Text
FUNCTION Start() AS VOID STRICT
? "Hello World! Today is ",Date()
private _handle
local buff
STORE SqlConnect("mysqlconn") to _handle
sqlexec(_handle, "select 1 a, 'any' b","test")
scatter memo to buff
WAIT
RETURN
2nd. the line "scatter ..." throw the error:
XSharp.Error HResult=0x80131500 Message=Conversion Error from USUAL (STRING) to LOGIC Source=XSharp.RT StackTrace: en XSharp.__Usual.op_Implicit(__Usual u) en XSharp.VFP.Functions.__ScatterArray(__Usual[] Xs$Args) en ConsoleApplication2.Exe.Functions.Start() en ConsoleApplication2\Program.prg:línea 13
Robert the same error in another test. In this case the test check memo fields The loop append text to a non declared variable The variable exist and has the correct value (_MEMVAR->STEXT But when the programm try to assign the Text Property broke with the same error reported in this issue
The code
method ejemplo8() as usual // memo FIELDS test
_handle:= sqlconnect("mysql")
IF handle>0
local LRESULT
lresult:=0
LRESULT:= SqlExec(,_handle, "Select top 10 * from mae_log order by fechayhora desc","mae_log")
IF LRESULT
DBGoTop()
stext:= "" // not declared variable
DO WHILE (!EOF())
stext= stext + ltrim(str(len(renglon),10,0)) + "->" + left (renglon,32) // renglon is a big char field with 8000 chars (memo file in FoxPro)
stext = stext + Environment.NewLine
DBSKIP()
ENDDO
SELF:textBox1:Text:= stext <-- here throw the ERROR
_ds_:Close("mae_log")
ENDIF
ENDIF
END METHOD
The Error Description : Conversion Error from USUAL (STRING) to LOGIC Subsystem : BASE GenCode : EG_DATATYPE Data type error FuncSym : USUAL => LOGIC Severity : ES_ERROR Can Default : False Can Retry : False Can Substitute : False Argument Type : LOGIC Argument Number : 1 Argument : USUAL Arguments : {mae_log} Expected Argument Type : System.Boolean Stack Trace : en XSharp.__Usual.op_Implicit(__Usual u) en NSOMA.DataSession.Close(__Usual[] Xs$Args) en C:\Users\jpmos\Source\repos\X-Sharp\WindowsFormsApplication1\DataSesOma.prg:línea 354 en System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) en System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) en System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) en XSharp.RT.OOPHelpers.SendHelper(Object oObject, MethodInfo mi, __Usual[] uArgs, __Usual& result) en XSharp.RT.OOPHelpers.SendHelper(Object oObject, String cMethod, __Usual[] uArgs, __Usual& result) en XSharp.RT.OOPHelpers.DoSend(Object oObject, String cMethod, __Usual[] args) en XSharp.RT.Functions.__InternalSend(__Usual oObject, String cMethod, __Usual[] args) en NSOMA.Form2.ejemplo8() en C:\Users\jpmos\Source\repos\X-Sharp\WindowsFormsApplication1\Form2.prg:línea 924