KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Deploying a structure update with a re-purposed blob/picture field
PRODUCT: 4D | VERSION: 13.3 | PLATFORM: Mac & Win
Published On: August 16, 2013

As discussed in Tech Tip 76853, if you are going to re-purpose a blob or picture field to a different field type, it is important to sanitize the data prior to changing the field type. This is easy enough if you are working on an interpreted database, but may be more difficult if the database is compiled and deployed at a customer site?

One approach to this problem would be to deploy multiple structure updates in order to achieve the desired affect.

Structure Update 1 would have the original field type and do the sanitizing of the field data; for example the On Startup method could set the size of the to-be-changed field to 0 within all records and then alert the user to deploy Structure Update 2.

Structure Update 2 would have the new field type defined and have the original On Startup instead of the sanitization method.

Doing this two stage process would avoid the situation where a blob or picture field type is changed while the records still have blob or picture data.

See Also: