Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread 8708 Error and lpOptimistic
Mon, Nov 9 2009 9:39 PMPermanent Link

Davey Crackpot
Hi

Can someone please help me understand what situations would cause the following code to
raise an 8708 error at post when the LockProtocol is lpOptimistic.

It works fine if LockProtocol is lpPessimistic.  

Other info:
- Database is local, only running in one app
- StrictChangeDetection is False
- DBISAM 3.30, Delphi 2007
- Happens on first post.  Table has not been modified elsewhere in the app


     MyDB.StartTransaction;
     tblLinks.first;
     while not tblLinks.eof do
     begin
       Output.add(tblLinksID.AsString);
       try
         tblLinks.Edit;
         tblLinksGroupID.AsInteger := iGroup;
         tblLinks.Post; // <-- 8708 Error when LockProtocol is lpOptimistic
       except
         raise;
       end;

       inc(iProcessed);
       if (iProcessed mod COMMIT_FREQUENCY=0) then
         MyDB.FlushTransaction;
     end;

     etc.
Tue, Nov 10 2009 8:55 AMPermanent Link

"Robert"

"Davey Crackpot" <davey.crackpot@gmail.com> wrote in message
news:513292DA-729A-459E-B656-64291610DCEC@news.elevatesoft.com...
> Hi
>
> Can someone please help me understand what situations would cause the
> following code to
> raise an 8708 error at post when the LockProtocol is lpOptimistic.
>
> It works fine if LockProtocol is lpPessimistic.
>
> Other info:
> - Database is local, only running in one app
> - StrictChangeDetection is False
> - DBISAM 3.30, Delphi 2007
> - Happens on first post.  Table has not been modified elsewhere in the app
>

Where's the Table.Next?

Robert


Tue, Nov 10 2009 7:13 PMPermanent Link

Davey Crackpot
"Robert" wrote:
> Where's the Table.Next?

Oh, I neglected to mention that.  tblLinks is filtered to show only those items of
GroupID=xyz (and thus disappears from the results when we set GroupID to its new value).

Could that be the issue?  Are we somehow affecting the filtered results (and so moving the
cursor) before even calling post?
Fri, Nov 13 2009 12:47 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Davey,

<< Oh, I neglected to mention that.  tblLinks is filtered to show only those
items of GroupID=xyz (and thus disappears from the results when we set
GroupID to its new value).

Could that be the issue?  Are we somehow affecting the filtered results
(and so moving the cursor) before even calling post? >>

Does the error occur on the first loop, the second, etc. ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Nov 14 2009 1:40 AMPermanent Link

Davey Crackpot
> Does the error occur on the first loop, the second, etc. ?

On the very first loop.
Mon, Nov 16 2009 3:33 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Davey,

<< On the very first loop. >>

Hmmm, can you send me a project that reproduces this ?  I'm not sure what is
going on since the StartTransaction should perform the change detection,
thus making it impossible for any later Edits or Posts to encounter changes
by other sessions.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image