How to store picture in Dynamics Nav 2009 alternate
Most of developer will using BLOB as format picture record in Nav's Database,
but i have diffrent opinion, instead using BLOB why not try to save a filename of
picture and save the picture elsewhere? Ive been try so hard to figure this problem
and finally i came up with these trivia solution, although i dont know this will suite
for other developers.
Okay first let me debrief the Application that i've created :
1. For example use table Item for displaying the picture, Open Object Designer and
Click Design on Item Table. Insert field for storing a picture's name or location
2. Insert the new field with picture's name or location from your storage drive, and
Open Object Designer for Page in this example im using RTC as a client. Create
new page with Table Item as source, make a simple List Plus Page such as this :
3. Define Variables for storing location / filename, InStream and OutStream variable,
Also File variable to open Stream from location.
4. Finally set code for generating Image in stream to be allocated temporary in Picture
field. Im using OnAfterGetRecord to match all record with each picture file name
5. Thats it finish and Save the Page.
With this small example, i hope it can help to save more space for database, for not
storing a BLOB data anymore, specially when someone need to store hundred or million
Note : for network based server ensure client's RTC have access to data file (eg:image file in server) to do this grant access the image file for client users from windows network sharing control.