4D Write Pro has become a mature product with a lot of functionalities, surpassing the 4D Write plug-in in many areas (tables and bookmarks, for example). Furthermore, 4D Write Pro is 64-bits compliant, which is great since most operating systems will soon be 64-bits only. Migrating your documents from 4D Write to 4D Write Pro is a “must do”. In order to help you and your customers’ migrations, we’ve simplified the migration process with a ready-to-use component!
4D Write documents can be read and transformed into 4D Write Pro documents quite easily using the WP New command. Note that in order for 4D Write documents to be converted with this command, the documents must have be saved in BLOB fields and not in PICTURE fields.
Using picture fields to store 4D Write documents used to be the way to go, but beginning with 4D Version 6 (1996 … 22 years ago!) the recommendation has been to use BLOB fields. Incredibly, some older applications are still using picture fields – and this blog post aims to help them with the migration process.
a component to the rescue!
The goal is to read a 4D Write document saved inside a picture field and then save it in an object field … in one fell swoop.
For this, we’ve created a 4D component with a single method that receives a picture field as parameter and returns a Blob. The returned BLOB will be compatible with the WP New command, and a brand new 4D Write Pro document will be created!
Guess what?? This will work directly in 64 bits, so there’s no need to use the old 4D Write plug-in! Once all of your documents are saved into object fields, the component can be removed from your database.
Just two lines of code to get the job done!
The 4D component, as well as its source code, is available for download at no charge.