Re: Data reapperaing by Paul
Paul
Thu Mar 24 18:58:45 CST 2005
I had something similar once. It turned out that another process (written by
someone else; I didn't even know it existed), would open the table with
optimistic table buffering, take its sweet time doing some processing - and
during this time, my process made some quick changes to some records, in and
out very fast - then called a force tableupdate, overwriting all my changes.
I got reports that my process was failing to make the required changes, and
it took some doing to figure out what was going on.
The problem in that case was that since the other process opened and
buffered the whole table, even fields that it did not change would get
written back, and since it was a force update, conflicts would get ignored.
Sorry for the long story, but the moral is that maybe you have something
like that going on. Use views (or set field properties in the cursor), so
that you don't update fields that you're not actually working with, and
check for update conflicts. In your case, if you're deleting records, maybe
another user has those records open, then updates them. If it's an
"ordinary" update conflict, the back-end field value will have changed, and
conflict catching will detect it. But if the back-end records have been
marked for deletion, I don't know what TABLEUPDATE() will return. Play with
it and find out.
"Altman" <NotGiven@SickOfSpam.com> wrote in message
news:Oy4t25LMFHA.4080@TK2MSFTNGP09.phx.gbl...
> No they aren't even marked for deletion. I have a grid that is using
> OLEDB to get the data and display it and it does not show it so I know it
> gets deleted. But later when he comes back to this form, the records
> reappear. I went and looked at the actual table and sure enough they
> aren't marked for deletion. This has only happened once though. And I
> would like to know how it happened so it doesn't happen again.
>
>
> "Gene Wirchenko" <genew@ucantrade.com.NOTHERE> wrote in message
> news:0o8641hto2t6fncmip2mjr456ee3tji9pb@4ax.com...
>> On Thu, 24 Mar 2005 11:57:17 -0600, "Altman" <NotGiven@SickOfSpam.com>
>> wrote:
>>
>>>I have a part of our program that modifies a bunch of records, adds
>>>records
>>>to a table and deletes records from another table. I have this all
>>>wrapped
>>>in a transaction. I had a customer that said that everything worked fine
>>>and the records were deleted from one table and were added to the other
>>>table like it should, and all other modifications on other tables went
>>>through fine. Yet when he went into that screen later he noticed that
>>>the
>>>records that were deleted before had reappeared. The other tables in the
>>>transaction didn't change. Just the records that were deleted came back.
>>>They are running the program on a Windows XP Pro and the database is
>>>located
>>>on a Windows Server 2003. I can't find anything in the code that would
>>>be
>>>causing this issue. Is there a possible Server 2003 setting that is
>>>buffering file writes and it somehow got lost? The program that is
>>>currently at this site is written in VFP 8 SP1 but will be updated soon
>>>to
>>>VFP 9.
>>
>> set deleted?
>>
>> Sincerely,
>>
>> Gene Wirchenko
>>
>
>