The following is a simple routine to export a picture from your version 6.0, 6.5 and 6.7 database to a file.
C_PICTURE($PicVariable)
$PicVariable:=[Table 1]PictureField
$DocRef:=Create document("Picture.pict")
SAVE PICTURE TO FILE($DocRef;[Table 1]PictureField)
CLOSE DOCUMENT($DocRef)
The following is a routine to import a picture to your version 6.0 or 6.5 database. This procedure requires a use of the ACI Pack.
C_PICTURE($PicVariable)
$DocRef:=Open document("")
If (OK=1)
CLOSE DOCUMENT($DocRef)
CREATE RECORD([Table 1])
$err:= AP Read picture file (Document;$PicVariable)
[Table 1]PictureField:=$PicVariable
SAVE RECORD([Table 1])
End if
The following is a routine to import a picture to your version 6.7 database.
C_PICTURE($PicVariable)
CREATE RECORD([Table 1])
$err:=READ PICTURE FILE("";$PicVariable)
[Table 1]Field1:=$PicVariable
SAVE RECORD([Table 1])