Pictures and documents

A data source such as a text file can include references to picture and document files. You can also import pictures and documents directly.

You cannot use the iBase xml schema to export pictures and documents to XML to export to XML, use the Microsoft™ Rowset xml schema.

Importing pictures

When you are importing from text files, you can import referenced pictures if the picture file is accessible and you assign the file to a Picture field. For example, in the User Guide database, the Person entity has a suitable field.

When you are specifying picture files in a data file:

  • If the picture file is in the same folder as the data file, use a name with the appropriate extension. For example, you can use: Hoffmann.bmp.

  • If the picture file is stored in another location, use the full path. For example, assuming that the drives, folders, and files exist, you can use: C:\photographs\smith.bmp or \\server-name\folder\CARTER.BMP

You can import files in which only some of the records have a picture. Records without a picture need to include a pair of field delimiters with nothing in between to indicate the empty value.

Importing documents

You can import document files in a similar way to pictures by placing a reference to the file names in the data source and assigning the source field to an iBase field of type Document.

Exporting pictures

When you export data that contains pictures, each picture file is saved in the same folder as the export file, and in its original file format. The files take the same name as the export file.

Exporting documents

When you export data that contains documents, each document is saved in the same folder as the export file, in its original file format, with the same name as the export file.

Note: If your document or picture files are locked, they are not saved as part of the export process. The export completes with errors. Details of any files in use by another process can be found in the export file.