Store File into BLOB Field

erugalatha
Member Posts: 120
Hi,
What is the code to take file from disk (i.e. using Common Dialog Codeunit functionality) and store it in a field of Type BLOB?
Thanks for any help.
What is the code to take file from disk (i.e. using Common Dialog Codeunit functionality) and store it in a field of Type BLOB?
Thanks for any help.
0
Comments
-
myBlobField.IMPORT('*.BMP',TRUE);
No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Thank you.
Can it be files of any type? i.e. not just .BMP0 -
From Help..
Sub Type
Use this property to provide additional information about what will be contained in this field.
This property only applies to BLOB fields.
Settings: The SubType settings are:
Bitmap, Memo, User defined information User-Defined (default)
Comments
When you use C/AL functions IMPORT and EXPORT, the system will provide a dialog window from which the user can pick the BLOB to import or export.
Based on your selection here, the system will show only the appropriate file types. For instance, if you select Bitmap, the system shows only files with the extension .bmp. If you select Memo, the system shows only files with the extension .txt. If you select User-Defined, the system shows all files.0 -
Thank you.0
-
Is it possible to get the filename and file path from the dialog box of the BLOB.IMPORT('*.*', TRUE) function?
i.e. I want to store the filename and file path in the Filename and FilePath text fields on the record.
It seems you have to pass in the filename to the IMPORT function but I want to use the filename and filepath that the user selects to store in other fields.
In the help it suggests to use ImportedName := with a DataType of Filename ... as far as I can tell this DataType is not available in Navision.
Thank you.0 -
Has anyone had any luck using the BLOB SubType field? According to MS support, it doesn't serve any purpose..
IE: if the Subtype was set to Txt, I would expect the Common Dialog to default to "Files of type" txt..0 -
Hello Rdwyer
Take a look at this thread on how to select a file. You can then use this import the file into blob.
http://www.mibuso.com/forum/viewtopic.php?t=14834&highlight=filename
You can store the file name as string as well as file type in a separate field.0 -
Hello,Has anyone had any luck using the BLOB SubType field? According to MS support, it doesn't serve any purpose..
IE: if the Subtype was set to Txt, I would expect the Common Dialog to default to "Files of type" txt..
For me the Memo option works fine, but User-Defined (both with and without angle braces <>) still gives *.bmp extension ](*,)0 -
hi All, Is there any possibility to define the format of file stored in BLOB field (*.jpeg; *.bmp; *.tiff)?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions