Hi,
I migrated a VO application to X#.
in a class I opened a DBserver with 8 indexes.
The setOrder method works fine for all 8 indexes, but returns false when I perform a setOrder(0) sequential order.
nOrder := oControl:Value
IF !SELF:Server:setorder(nOrder)
Message("E", "", "Unable to select "+vOrder)
RETURN
ENDIF
Has anyone encountered this before?
thanks.
SetOrder(0) method problem
Re: SetOrder(0) method problem
Hi Dominique,
That should normally work. What index are you using, CDX or NTX? Is this the only dbf that doesn't work correctly, or is it with all dbfs?
That should normally work. What index are you using, CDX or NTX? Is this the only dbf that doesn't work correctly, or is it with all dbfs?
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: SetOrder(0) method problem
Hi Chris,
I use ntx.
the problem occurs on others dbf files.
I use ntx.
the problem occurs on others dbf files.
Re: SetOrder(0) method problem
Hi Dominique,
Thanks, I was testing with CDX before where it works well, but I do see the problem with NTX.
Will open a report for it to be fixed, but for now I think you can ignore the FALSE return value for SetOrder(0), it seems that the natural order is actually getting selected correctly.
Thanks, I was testing with CDX before where it works well, but I do see the problem with NTX.
Will open a report for it to be fixed, but for now I think you can ignore the FALSE return value for SetOrder(0), it seems that the natural order is actually getting selected correctly.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: SetOrder(0) method problem
Hi Chris
I think we have some others problems with NTX index.
Zap function and Reindex function don't perform correctly.
For example the following code:
Is it possible to fix this 2 issues and have you a method to convert simply NTX DBF to CDX DBF ?
Thank you
Cyril
I think we have some others problems with NTX index.
Zap function and Reindex function don't perform correctly.
For example the following code:
Code: Select all
LOCAL oDB AS DbServer
LOCAL oMes AS warningbox
oDB := DBserver{"C:\Temp\testIndex\EXPLOIT_Test_Zap.DBF", FALSE, FALSE, "DBFNTX"}
oDB:SetIndex("C:\Temp\testIndex\EXPLOIT_Test_Zap.NTX")
oMes := warningbox{,"Message", "NTX : Count before Zap = " + Str(oDB:Count())}
oMes:show()
oDB:Zap()
oMes := warningbox{,"Message", "NTX : Count after Zap = " + Str(oDB:Count())}
oMes:show()
oDB:Append()
oDB:FIELDPUT(#CLEF, "GX003")
oDB:FIELDPUT(#CHEMIN_exe,"Test")
oMes := warningbox{,"Message", "NTX : Count after Append = " + Str(oDB:Count())}
oMes:show()
oDB:Reindex()
oMes := warningbox{,"Message", "NTX : Count after Reindex = " + Str(oDB:Count())}
oMes:show()
oDB:CreateIndex("C:\Temp\testIndex\EXPLOIT_Test_Zap.NTX", "substr(clef,3,3)")
oMes := warningbox{,"Message", "NTX : Count after CreateIndex = " + Str(oDB:Count())}
oMes:show()
oDB:Close()
oDB := DBserver{"C:\Temp\testIndex\EXPLOIT_Test_Zap.DBF", FALSE, FALSE, "DBFCDX"}
oDB:SetIndex("C:\Temp\testIndex\EXPLOIT_Test_Zap.CDX")
oMes := warningbox{,"Message", "CDX : Count before Zap = " + Str(oDB:Count())}
oMes:show()
oDB:Zap()
oMes := warningbox{,"Message", "CDX : Count after Zap = " + Str(oDB:Count())}
oMes:show()
oDB:Append()
oDB:FIELDPUT(#CLEF, "GX003")
oDB:FIELDPUT(#CHEMIN_exe,"Test")
oMes := warningbox{,"Message", "CDX : Count after Append = " + Str(oDB:Count())}
oMes:show()
oDB:Reindex()
oMes := warningbox{,"Message", "CDX : Count after Reindex = " + Str(oDB:Count())}
oMes:show()
oDB:CreateIndex("C:\Temp\testIndex\EXPLOIT_Test_Zap.CDX", "substr(clef,3,3)")
oMes := warningbox{,"Message", "CDX : Count after CreateIndex = " + Str(oDB:Count())}
oMes:show()
oDB:Close()
Thank you
Cyril
Re: SetOrder(0) method problem
Hi Cyril,
The Zap problem was reported again some days ago and is already fixed, the fix will be included in the next X# release.
We were not aware of a problem with Reindex though, does this only happen after the Zap? If yes, then probably the Zap fix takes care of that, too.
The Zap problem was reported again some days ago and is already fixed, the fix will be included in the next X# release.
We were not aware of a problem with Reindex though, does this only happen after the Zap? If yes, then probably the Zap fix takes care of that, too.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: SetOrder(0) method problem
Thank you Chris
Yes Reindex problem append after zap. I'll test with the next release
Cyril
Yes Reindex problem append after zap. I'll test with the next release
Cyril