Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mysterious disappearing, tableupdated data
Message
De
19/07/2004 13:16:10
 
 
À
19/07/2004 12:55:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00925823
Message ID:
00925843
Vues:
18
Terry,

You don't mention the version/sp of VFP.
If it is one that supports SET TABLEVALIDATE, do you perchance have it set to 0? (If 0, try a value that does something).

There is a known issue with TRANSACTIONs (reproducible there but may exist outside of them) where a "corrupted table" will let updates appear to work when in fact NOTHING actually gets written.
The corruption in question is the kind where the physical table size in bytes does not match the calculated size of the table, using the header data. Usually one of them differs by 1 and that is enough to do it.

good luck


>Dear Foxperts
>
>I'm appending loads of records to a table (data agragated and copied from one table to the other), I watch them being created, in debug, I Tableupdate(.T.) regularly and appropriately. All done, the form is released, Autoclosetables in .T.
>
>I go to look at the table and ... not a sausage. Weird thing is, this has always worked before but now it's not. Equally, the source table gets its field names and captions from an Excel S/s (via DBSETPROP()), and these capts. (very important because the field names, representing census categories, are meaningless without the s/s caption) used to be copied from source to dest. Now this not working.
>
>I include the code below for clarification. The only difference nowadays is that the data aren't in a fixed place, but are found by means of a path string. So the data are in a different place from when the system worked ok.
>
>It's interesting that, although I run the "Change database" code in the .BeforeOpenTables() of the DE, in debug the dbc() func returns the tables' original dbc and not the onme taht accompanies them in the remote folder.
>
>Any help?
>
>Frustrated of England
>
>
>Wait WINDOW "Populating CENSUS ZONE Table from Census ED Data..." NOWAIT NOCLEAR
>*________________
>Select CENEDZONE											&& Census ED - Zone link table
>SCAN
>  lnRecNo			= lnRecNo + 1
>  lcED_Area_ID		= ED_AREA_ID
>  lnPercAlloc		= PERC_ALLOC
>  If CENEDZONE.ZONE <> lnZoneNo	    && Finished totting for last zone no
>      Select CENSUSZN
>      If not INDEXSEEK( lnZoneNo)  && If not already got
>	  Append BLANK in CENSUSZN	&& Create new Census Zone rec
>      EndIf not SEEK()
>      Replace ZONE 	with lnZoneNo		in CENSUSZN
>      Replace VAR_ID	with Thisform.nVarID	in CENSUSZN	
>      FOR lnFieldNo = 3 to lnFieldCount		&& For all fields in CENSUSZN rec, bar ZONE, VAR_ID
>	lcFieldName	= ALLTRIM( FIELD( lnFieldNo))
>
>*	Round result to correct integer no. of people in each category
>*	______________________________________________________________
>	Replace &lcFieldName with INT( ROUND( laFieldTots( lnFieldNo-2), 0)) in CENSUSZN
>      ENDFOR
>      = TABLEUPDATE(.T.)
>      laFieldTots	= 0  	  		&& Clear array for next rec
>      lnZoneNo		= CENEDZONE.ZONE	&& next new zone no
>  EndIf CENEDZONE.ZONE <> lnZoneNo
>
>  If SEEK( lcED_Area_ID, "CENSUSED", "ED_AREA_ID")	&& if find parent ED in CENSUSED
>      Select CENSUSED
>      FOR lnFieldNo = 3 to lnFieldCount	&& For all fields in CENSUSED rec, bar ED_AREA_ID & PERC_ALLOC
>	lcFieldName	             = ALLTRIM( FIELD( lnFieldNo))
>	laFieldTots( lnFieldNo-2)  = laFieldTots( lnFieldNo-2) + &lcFieldName * lnPercAlloc / 100
>      ENDFOR
>  EndIf SEEK()
>  Select CENEDZONE
>ENDSCAN
>
>Select CENSUSZN		&& Last rec after loop
>If not SEEK( lnZoneNo)	&& If not already got
>    Append BLANK 	in CENSUSZN	&& Create LAST Census Zone rec
>EndIf not SEEK()
>Replace ZONE with lnZoneNo			in CENSUSZN
>Replace VAR_ID	with Thisform.nVarID	in CENSUSZN	
>FOR lnFieldNo = 3 to lnFieldCount	&& For all fields in CENSUSZN rec, bar ZONE, VAR_ID
>  lcFieldName	= ALLTRIM( FIELD( lnFieldNo))
>  Replace &lcFieldName with INT( ROUND( laFieldTots( lnFieldNo-2), 0)) in CENSUSZN
>ENDFOR
> = TABLEUPDATE(.T.)
>
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform