KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to retrieve a picture from 4D Open for Java
PRODUCT: 4D | VERSION: 6.7 | PLATFORM: Mac & Win
Published On: September 28, 2001
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

The Picture type does not exist in 4D Open for Java. If you need to retrieve a picture, you will need to use the BLOB type instead. In your 4D database, you may have a Picture field. In your Java code, you will have the following statement:

mydataArray[0].mDataArray[0].mBlob;

The above example will allow you to retrieve the picture into a BLOB Java field.

The following CreatePicture method will allow you to retrieve the requested picture:

myPicture = Toolkit.getDefaultToolkit().CreatePicture (mydataArray[0].mDataArray[0].mBlob);