Indexes not working with .net 5+ (DBFCDX) ?

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
baramuse
Posts: 98
Joined: Tue Nov 29, 2022 8:31 am
Location: France

Indexes not working with .net 5+ (DBFCDX) ?

Post by baramuse »

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 :

Code: Select all

.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:

Code: Select all

.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
RddTests.zip
(5.48 KiB) Downloaded 79 times
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Indexes not working with .net 5+ (DBFCDX) ?

Post by robert »

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

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
baramuse
Posts: 98
Joined: Tue Nov 29, 2022 8:31 am
Location: France

Indexes not working with .net 5+ (DBFCDX) ?

Post by baramuse »

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

Code: Select all

lShareMode 
to

Code: Select all

 DBSHARED (TRUE)
then indexes don't work.
If I set it to

Code: Select all

DBEXCLUSIVE (FALSE)
then it does work.

Code: Select all

DbServer{"TestTable.dbf", DBEXCLUSIVE , FALSE, "DBFCDX"}
Should it be correlated ?

Best regards.
Post Reply