Moin: I want to store a textfile in the BLOB field of a NAVISION table. For testing purposes I created the following code. It seems to work. After importing a textfile the HASVALUE is true and the variable Importname contains the selected filename. OnPush() ImportName := BlobField.IMPORT ( FileName, TRUE ); IF ( ImportName = ‘’ ) THEN MESSAGE ( ‘Error importing file!’) ELSE MESSAGE ( ‘File imported successfully!’); IF BlobField.HASVALUE THEN MESSAGE ( ‘BlobField contains data!’) ELSE MESSAGE ( ‘BlobField doesn´t contain any data!’ ); MODIFY; I created the following code to restore the textfile: IF BlobField.HASVALUE THEN MESSAGE ( ‘BlobField contains data!’) ELSE MESSAGE ( ‘BlobField doesn´t contain any data!’ ); ExportName := Textdatei.EXPORT ( FileName, TRUE ); IF ( ExportName = ‘’ ) THEN MESSAGE ( ‘Unable to export file!’) ELSE MESSAGE ( ‘File exported successfully!’); Can anybody tell me what´s wrong with the code? An additional question: As far as I understand the datatype BLOB it should be possible to store any kind of data in it. Does NAVISION do a type control if I select a TXT- or a BMP-file? How can it be done, to preset *.DOC in the commondialog if I want to export/import MS Word docs? Regards Uwe
Hi, You need: CALCFIELDS(BlobField) before BlobField.HASVALUE. Valentin Gvozdev BMI Inc.
Valentin: You´re right! That did it! There is no hint in the docs on this! Thank you! Regards Uwe