4D Blog

Home Tips Migrate 4D Write documents stored in picture fields

Migrate 4D Write documents stored in picture fields

November 9, 2018

Tips

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.

$Blob:=Extract4W7 ([WR_DOCS]wrPictureDocument)
[WR_DOCS]wpDocument:=WP New($Blob)

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. 

From 4D Write to 4D Write Pro component

 

Discuss

Tags 4D Write Pro, Migration

Latest related posts

  • April 28, 2025

    Tips & Tricks for your 4D Apps – April 2025 Edition

  • April 9, 2025

    Restrict data according to privileges or information saved in session storage

  • April 7, 2025

    Designing an Interactive and Dynamic Menu Bar in Qodly application

Roland Lannuzel
Roland Lannuzel
• Product Owner & 4D Expert •After studying electronics, Roland went into industrial IT as a developer and consultant, building solutions for customers with a variety of databases and technologies. In the late 80’s he fell in love with 4D and has used it in writing business applications that include accounting, billing and email systems.Eventually joining the company in 1997, Roland’s valuable contributions include designing specifications, testing tools, demos as well as training and speaking to the 4D community at many conferences. He continues to actively shape the future of 4D by defining new features and database development tools.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy