> Since noticing the 4D function "Is field number valid”, making it easy to 
> detect deleted fields, I thought field numbers would not be reused. It turns 
> out this is not the case. A bit of testing reveals that 4D does not even 
> clear the data when deleting a field, and still references data by field 
> number, which means after deleting a field, a newly created field is 
> “initialized" with the old data!


This is how 4D has worked ever since you could delete fields. You can always 
use an SQL command to append field, this doesn’t reuse a field.

Even more cool than being able to reuse a field, is that you can change a 
structure type (say from numeric to alpha) and 4D will auto convert the data 
automatically… the data in the datafile isn’t modified it stays what the 
previous datatype was until the record is saved again. 4D does the conversion 
of the data where ti makes sense.

So this bug as you call it, feature as I call it, can be used to your advantage 
if you understand how it works.

In your case just use the SQL append and you are all set.

Neil

--
Neil Dennis
4D Developer since 1990

GreaText - Designing Software for the Way You Work
716 East 1850 N
North Ogden, UT 84414

mailto:npden...@greatext.com
http://www.greatext.com/

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to