Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Indexes not working with .net 5+ (DBFCDX) ? 04 Jan 2023 19:30 #24926

  • bmellac
  • bmellac's Avatar
  • Topic Author


  • Posts: 28
  • Hi,

    I've been testing some XSharp lib under .net 5 and it seems like the DBFCDX driver is not working properly as it can't seek.
    I've attached an example solution with bot .net4.8 and .net6 (SDK) projects, as well as a minial database.
    Same .prg is being used, output from 4.8 :
    .Net Version  : 4.0.30319.42000
    X# Version    : XSharp 2.14.0.4
    In Bits       : 32
    Dialect       : VO
    Hello World! Today is  04/01/2023
    found record ?  True

    and from 6.0:
    .Net Version  : 6.0.12
    X# Version    : XSharp 2.14.0.4
    In Bits       : 64
    Dialect       : Core
    Hello World! Today is  04/01/2023
    found record ?  False
    Attachments:

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

    Indexes not working with .net 5+ (DBFCDX) ? 04 Jan 2023 23:38 #24928

    • robert
    • robert's Avatar


  • Posts: 3447
  • Basile,
    You will have to include the XSharp.MacroCompiler dll.
    .Net 4 loads that DLL from the GAC

    Robert
    XSharp Development Team
    The Netherlands

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

    Indexes not working with .net 5+ (DBFCDX) ? 05 Jan 2023 16:15 #24935

    • bmellac
    • bmellac's Avatar
    • Topic Author


  • Posts: 28
  • Hi Robert,

    thanks for the answer, I do remember have read that somewhere, and indeed, adding the MacroCompiler reference fixed it.
    Maybe a trace in the los warning indexes won't work without the reference ?

    Though I found another issue:
    if I set the
    lShareMode
    to
    DBSHARED (TRUE)
    then indexes don't work.
    If I set it to
    DBEXCLUSIVE (FALSE)
    then it does work.
    DbServer{"TestTable.dbf", DBEXCLUSIVE , FALSE, "DBFCDX"}

    Should it be correlated ?

    Best regards.

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

    • Page:
    • 1