Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rebuilding tables
Message
 
 
To
26/01/2000 18:06:53
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00323249
Message ID:
00323261
Views:
27
Modifications are in blue.
>* Create the new structure in memory
>	? "Creating new structure"
>
>	select distinct * ;
>		from datadict ;
>		where datadict.d_template == template;
>		having datadict.field_name != "Proxy" ;
>		into array dbf_struc ;
>		order by field_ord
>

	create cursor tempcrs from array dbf_struc
	select tempcrs

	use dbf() again in 0 alias tempdbf  && makes cursor RW instead of RO
	use
	select tempdbf
	
>* Copy the data from the old table into the new structure
>? "Copying old data"
>if file(currdbf) *THIS IS WHERE I GET THE ERROR
>	append from (currdbf) && This is where we will likely have an error
>endif
>
>* If we had an error that couldn't be fixed, Say so and exit.
>	if GotError  0
>		Wait Window "Rebuild found a problem it couldn't fix in file: "+upper(Currdbf) Timeout 5
>		wait window "Error #: "+alltrim(str(goterror))+" Message: "+alltrim(message()) Timeout 5
>		RETURN -1
>endif
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform