-
-
Notifications
You must be signed in to change notification settings - Fork 45
Description
This is the last problem I am fighting with, in Joe's app. The attached (empty) dbf file is one that is used in the app and the accompanying (also included) .cdx file is being generated (for the empty dbf) on the fly on app startup. The problem is that the first operation made on this particular file/index fails (returns false actually), see below:
FUNCTION Start() AS VOID
? DbUseArea(,"DBFCDX","c:\test\test.dbf",,TRUE) // true
? DbAppend() // false
? DbCloseArea() // false
there's also a handled exception, see below. This problem happens only the first time the test runs. In the second run, all works well (same happens in the real app). Also after packing or zapping or simply reindexing the empty dbf, then there is not problem at all. So it looks like there's some problem/incompatibility only with the initial generation of this particular index file.
Problem is that when I try to generate the index in a test app, then it always works correctly, it's only when it is being created from the original large app that it later fails. I guess there's some setting from the app that I am missing, but haven't figured out what that is yet.
Anyway, Robert, can you tell by the exception message or by debugging with the index file provided what the problem is with it? Is it worth me trying to further track this down and try to create a repro sample also for producing this index?
This is the handled exception when calling DBAppend(), which fails:
HANDLED exception:
XSharp.RDD.RddError
Callstack :
System.Void XSharp.RDD.DBF._dbfError(System.Exception ex, System.UInt32 iSubCode, System.UInt32 iGenCode, System.String strFunction, System.String strMessage, System.UInt32 iSeverity, System.Boolean lThrow)()
XSharp.RDD.CDX.CdxLeafPage.Boolean XSharp.RDD.CDX.CdxLeafPage.Write()()
CdxAction XSharp.RDD.CDX.CdxLeafPage.Insert(System.Int32 nPos, System.Int32 recno, System.Byte[] key)()
CdxAction XSharp.RDD.CDX.CdxTag.InsertKey(XSharp.RDD.CDX.CdxAction action)()
XSharp.RDD.CDX.CdxTag.CdxAction XSharp.RDD.CDX.CdxTag.DoAction(XSharp.RDD.CDX.CdxAction action)()
XSharp.RDD.CDX.CdxTag.Boolean XSharp.RDD.CDX.CdxTag._keyUpdate(System.Int32 recordNo, System.Boolean lNewRecord)()
Boolean XSharp.RDD.CDX.CdxTag.GoCold()()
Boolean XSharp.RDD.CDX.CdxOrderBag.GoCold()()
Boolean XSharp.RDD.CDX.CdxOrderBagList.GoCold()()
XSharp.RDD.DBFCDX.Boolean XSharp.RDD.DBFCDX.GoCold()()
XSharp.RDD.DBFCDX.Boolean XSharp.RDD.DBF.Append(System.Boolean lReleaseLock)()
Boolean XSharp.CoreDb+<>c__DisplayClass18_0.<Append>b__0()()
static Object XSharp.CoreDb.Do(System.Func`1[System.Object] action)()
static Boolean XSharp.CoreDb.Append(System.Boolean lReleaseLocks)()
static Boolean XSharp.RT.Functions.DbAppend(XSharp.__Usual[] Xs$Args)()
static System.Void xRuntime.Exe.Functions.Start()() : C:\VIDE\Projects\Project3\Applications\xRuntime\Prg\xRntime.prg : 7
``