>> 2. Have you checked the new array to see if the data is there? In other words >are you losing the edited data when you do the SQL or when updating
>> the list?
>
> Yes! The array does NOT contain the data that has been modified, only
> when I add a new record does the array contain what is actually in the
> table. And, the weird thing is that I am not losing the edited data. If
> I run my form again, the edited data appears in the list box.
>
>
>> Walk through the process with debug checking the edited data at each point. >You'll probably have a better grasp of the problem then.
>
> I have walked through the process several times in debug. What is happening is this: I edit the data, I run a process which issues a REPLACE on the new data, then I issue a TABLEUPDATE() command. At this point I check in debug and find the following things: The table contains the newly edited data. I then re-dimension the array to nothing (to get rid of all elements) and I check the array in debug and it is empty. I then issue the SQL statement which takes data from this table and stuffs it into the aforementioned array. I check the array and the old information (as it existed prior to the edit) is still there!! It appears, as I stated before, that the re-issue of the SQL command is somehow grabbing data that is stored or cached in memory and not directly from the table. At this point, barring any other suggestions I am going to try and force the table close, re-open it and then run the SQL again. If this works, I guess it will be just another weird bug/anomaly in foxpro.
>It doesn't make sense to me, but that is just the way things are I guess.
>
It sounds like both the view and the underlying table are opened and both are buffered, with the underlying table being TABLE BUFFERED. If that's the case, you need to TABLEUPDATE() the View
AND the underlying instance of the base table in order to get the updated data in place.
IOW, the TABLEUPDATE() of the view commits the data from the view to the table, but the table itself is buffered, and the data for it isn't refreshed with the data from the view until
its buffers have been committed as well...