Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TableUpdate?
Message
From
28/07/1999 08:35:00
 
 
To
28/07/1999 03:31:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00246889
Message ID:
00247055
Views:
24
>> 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...
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform