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

TOPIC:

2.6a vs 2.8 Index creation problem. Why? 04 May 2021 21:17 #18309

  • jpmoschi
  • jpmoschi's Avatar
  • Topic Author


  • Posts: 76
  • Good morning forum, i have serious problems with the 2.8 revision. I am trying to jump from 2.6a revision but is imposible with this level of errors. The next is a Console Program to expose one of them with a index creation. Before the index creation and DbGoTop() the record pointer is in EOF ignoring the DBGoTop().

    Less important but diferent in foxpro, when a record pointer is in eof, It never lose its data type. If a field is char(xx), the value in EOF is space(xx), if a field is numeric, the value in EOF is 0, etc.

    Really i need your help
    Best regards
    Juan



    Program.prg
    USING System
    USING System.Collections.Generic
    USING System.Linq
    USING System.Text
    
    FUNCTION Start() AS VOID STRICT
        ? "Hello World! Today is ",Date()
        private _handle
        STORE [code]SqlConnect("MSSQLTEST") to _handle
        LRESULT = SqlExec(_handle , "select m03codoper, m03vigente from m03oper","w03oper")
        DbSelectArea("w03oper")
        ? "After DbCreateIndex", "DbGoTop:", DbGoTop(), "Eof:",Eof() , "RecCount():", RecCount(), "Recno:", RecNo()
        ? w03oper->m03codoper
        ? w03oper->m03vigente
        ?DbCreateIndex("key1",,{|| m03vigente + m03codoper } ,FALSE)
        ? "Before DbCreateIndex", "DbGoTop:", DbGoTop(), "Eof:",Eof() , "RecCount():", RecCount(), "Recno:", RecNo()
        ? w03oper->m03codoper
        ? w03oper->m03vigente

    Output
    Hello World! Today is  04/05/2021
    After DbCreateIndex DbGoTop: .T. Eof: .F. RecCount(): 5568 Recno: 1
    $ 01 BI
    N
    .T.
    Before DbCreateIndex DbGoTop: .T. Eof: .T. RecCount(): 5568 Recno: 5569
    .F.   ???  What happend with DbGoTop in prior line ?  End of file value is Logical y a character field? 
    .F.

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

    2.6a vs 2.8 Index creation problem. Why? 06 May 2021 17:39 #18356

    • Chris
    • Chris's Avatar


  • Posts: 3856
  • Hi Juan Pablo,

    Thanks for your report, we're looking into it. Just to make sure it's a general problem and not specific to the table/columns you use in this sample, do you get this odd behavior in every case?
    XSharp Development Team
    chris(at)xsharp.eu

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

    2.6a vs 2.8 Index creation problem. Why? 07 May 2021 17:42 #18383

    • Chris
    • Chris's Avatar


  • Posts: 3856
  • Robert has fixed this problem, it had to do with NULL string values, see here: github.com/X-Sharp/XSharpPublic/issues/630
    XSharp Development Team
    chris(at)xsharp.eu

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

    • Page:
    • 1