fbpx
Welcome, Guest
Username: Password: Remember me
This public forum is meant for questions and discussions about Visual FoxPro
  • Page:
  • 1

TOPIC:

first test in 2.8 29 Apr 2021 16:50 #18240

  • jpmoschi's Avatar

  • jpmoschi

  • Topic Author


  • Posts: 28
  • good morning for me, forum:
    A simple error beginning the test of the 2.8 review. May by, it is a project setting option?

    my code say
    local lseleant := select()

    The error is 'Select()' threw an exception of type 'System.ArgumentException'
    Data: {System.Collections.ListDictionaryInternal}
    HResult: -2147024809
    HelpLink: null
    InnerException: null
    Message: "El valor no está dentro del intervalo esperado."
    ParamName: null
    Source: "XSharp.RT"
    StackTrace: " at XSharp.RT.Functions._SelectFoxPro(__Usual[] Xs$Args)
    at XSharp.RT.Functions.Select(__Usual[] Xs$Args)"
    TargetSite: {XSharp.__Usual _SelectFoxPro(XSharp.__Usual[])}
    XSharp.RT.Select()
    error CS0234: The type or namespace name 'Select' does not exist in the namespace 'XSharp.RT' (are you missing an assembly reference?)


    Is it a setting option?
    thanks in advance

    Juan

    Please Log in or Create an account to join the conversation.

    first test in 2.8 29 Apr 2021 21:51 #18253

  • robert's Avatar

  • robert


  • Posts: 2174
  • Juan,
    Will look at this asap.
    This looks like a bug to me.

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    first test in 2.8 high priority! All the fields values have the same value:false 30 Apr 2021 20:17 #18260

  • jpmoschi's Avatar

  • jpmoschi

  • Topic Author


  • Posts: 28
  • ok, it is not important because i can replace Select() with DBGetSelect() without alotof work

    but it is really important. The query below execute correctly but all the fields values have the same value:false

    if SqlExec(1 , "select m03codoper, m03vigente from m03oper","w03oper")= 1
    ?Evaluate("m03codoper")
    False ( Logic )
    Value: FALSE

    ?Evaluate("m03vigente")
    False ( Logic )
    Value: FALSE

    endif
    And in whatch window apparently is correct. It should be clarified that the data types of the fields are M03CODEOPER Char(8)and M03VIGENTE Char(1)

    XSharp.RDD.DataSession.Sessions {XSharp.RDD.DataSession[1]} XSharp.RDD.DataSession[]
    [0] Global datasession Id: 1 XSharp.RDD.DataSession
    CurrentWorkarea DBFVFPSQL (W03OPER) XSharp.RDD.IRdd {XSharp.RDD.DBFVFPSQL}
    CurrentWorkareaNO 1 Dword
    Id 1 Int
    Name "Global datasession" String

    Please Log in or Create an account to join the conversation.

    first test in 2.8 high priority! All the fields values have the same value:false 03 May 2021 16:06 #18271

  • robert's Avatar

  • robert


  • Posts: 2174
  • Juan Pablo,
    The evaluate() function uses the macro compiler to evaluate the expression. The macro compiler does not know if the string that you are passing it is a field, local variable, public variable or private variable. This makes it a relatively expensive operation. And apparently (I did not check this) it also fails to resolve this correctly.

    Can you try:
    ?Evaluate("w03oper.m03codoper")   // Cursor DOT FieldName
    ?Evaluate("w03oper->m03codoper")   // Cursor ALIAS operator FieldName
    These 2 also use the macro compiler
    And what is the result if you code:
    ? w03oper.m03codoper
    or
    ? FieldGetAlias("w03oper", "m03codoper")
    or
    ? FieldGetSym("m03codoper")


    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    first test in 2.8 high priority! All the fields values have the same value:false 03 May 2021 17:43 #18276

  • jpmoschi's Avatar

  • jpmoschi

  • Topic Author


  • Posts: 28
  • hi Robert . The Evaluate() was only used in inmediate window. The screen capture attached is more clear to show the problem.
    i create a new Console App
    Then run and watch ...
    Attachments:

    Please Log in or Create an account to join the conversation.

    first test in 2.8 high priority! All the fields values have the same value:false 03 May 2021 17:50 #18277

  • jpmoschi's Avatar

  • jpmoschi

  • Topic Author


  • Posts: 28
  • I know what is happening. The sqlexec return the result but the record pointer is in eof() in the new 2.8. release

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1