Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread BeginCachedUpdates and 9998 error
Wed, Aug 9 2006 9:46 AMPermanent Link

Mike Mayer
Hello,

I get 9998 error when trying to change boolean field and then call
ApplyCachedUpdates. I think it could be DBISAM bug, I have attached demo, could you look at it?


DBISAM version 4.24
Regards,
Mike



Attachments: error.zip
Wed, Aug 9 2006 2:35 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mike,

<< I get 9998 error when trying to change boolean field and then call
ApplyCachedUpdates. I think it could be DBISAM bug, I have attached demo,
could you look at it? >>

Do not post attachments in this newsgroup, use the Binaries newsgroup.

It appears to be a bug.  A fix will be in the next build, which is at least
a couple of weeks away still due to the ongoing EDB development.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Aug 9 2006 2:48 PMPermanent Link

Mike Mayer
Sorry for attachment, I have forgot about binary newsgroup.

The problem is that we should bring our accounting system
for client in next week, maybe you could you suggest work around?

We have bought VCL+CS+Source, so we have source files and could modify it if we knew where.
Mike
Thu, Aug 10 2006 11:30 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mike,

<< The problem is that we should bring our accounting system for client in
next week, maybe you could you suggest work around? >>

The only workaround that I know of is to not use cached updates.

<< We have bought VCL+CS+Source, so we have source files and could modify it
if we knew where. >>

In dbisamen.pas in the TDataCursor.LoadFromStream method, add this line:

                                   STREAM_TO_CACHE:
                                      begin
                                      if (not TempRetry) then
                                         begin
                                         InitRecord(TempRecordBuffer);
<<<<<<<<<<<<<<< Add this line
                                         PopulateRecordBuffer;
                                         PutRecordNo(TempRecordNumber,TempRecordBuffer);
                                         PutRecordID(TempRecordID,TempRecordBuffer);

That should fix the issue.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Aug 11 2006 5:13 AMPermanent Link

Mike Mayer
Could you please explain what line to add? Our DBISAM code looks exactly as yours.

I hope I am not violating license agreement by posting code from source files,
we need to solve this problem desperately.
--------
                                   STREAM_TO_CACHE:
                                      begin
                                      if (not TempRetry) then
                                         begin
                                         InitRecord(TempRecordBuffer);
                                         PopulateRecordBuffer;
                                         PutRecordNo(TempRecordNumber,TempRecordBuffer);
                                         PutRecordID(TempRecordID,TempRecordBuffer);
                                         if (TempEngineVersion >= 4.18) then
                                            PutRecordHash(TempRecordHash,TempRecordBuffer)
                                         else
                                            PutRecordHash(CalcRecordHash(TempRecordBuffer),TempRecordBuffer);
                                         end;
                                      AppendRecord(TempRecordBuffer,False,False,False,False,True);
                                      end;
Fri, Aug 11 2006 12:05 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mike,

<< Could you please explain what line to add? Our DBISAM code looks exactly
as yours. >>

Sorry about that, I put the notation on the wrong line:

                                   STREAM_FROM_CACHE:
                                      begin
                                      if (TempRecordNumber <> 0) then
                                         begin
                                         if (TempStatus <> RECORD_DELETED)
then
                                            begin
                                            if (not TempRetry) then
                                               begin
                                               InitRecord(TempRecordBuffer);
<<<<< Add this line
                                               PopulateRecordBuffer;

<< I hope I am not violating license agreement by posting code from source
files, we need to solve this problem desperately. >>

No, not at all.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Aug 11 2006 12:14 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


How many posts do you reckon it'll take before I have the full set of software?

Roy Lambert
Mon, Aug 14 2006 9:01 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< How many posts do you reckon it'll take before I have the full set of
software? >>

Quite a few. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Jan 31 2007 9:57 AMPermanent Link

Tomas R.
Tim, I suggest you to correct this line of code in the latest DBISAM version, it still contain this bug.



Regards,
Tomas
Wed, Jan 31 2007 4:30 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Tomas,

<< Tim, I suggest you to correct this line of code in the latest DBISAM
version, it still contain this bug. >>

It has been corrected, and this is the test that we run with every build for
that incident report:

program testproj;
{$APPTYPE CONSOLE}
uses
 SysUtils, Windows, Classes, tstframe, DB, dbisamtb, dbisamlb, dbisamcn;

var
  Table: TDBISAMTable;
begin
  InitializeTest;
  try
     if SetupTest(335) then
        begin
        Table:=TDBISAMTable.Create(nil);
        try
           with Table do
              begin
              DatabaseName:='g:\products\test\dbisam4\335';
              TableName:='document';
              Open;
              Database.StartTransaction;
              try
                 BeginCachedUpdates;
                 First;
                 Edit;
                 FieldByName('Default').AsBoolean:=True;
                 Post;
                 Next;
                 Edit;
                 FieldByName('Default').AsBoolean:=True;
                 Post;
                 ApplyCachedUpdates;
                 Database.Commit;
                 SetTestResult(True)
              except
                 Database.Rollback;
                 SetTestResult(False);
              end;
              end;
        finally
           Table.Free;
        end;
        end;
  finally
     ResetTest;
  end;
end.

It passes every time.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image