hi ,
I want to calculate the size of blob field in Navision 2016 so that i can limit the user to not to upload more than 50 kb size image. As per my understanding blob field can accept 2gb of data.
*This post is locked for comments
Thanks Jeet your Solution works for me.
Hi Sanjeet,
First ....you check file size after .... store file blob filed
Ex....
Name DataType
FILE File
filesize Integer
FILE.OPEN('E:\download\xyz.jpg');
filesize := FILE.LEN; // size give on byte
IF (filesize > 50000/1000) THEN // 1 kb = 1000 byte ..... put your condition //50 kB
ERROR(' ');
after this file store on blob filed
If my answer helps to resolve your issue, please verify it by clicking Yes
Regards,
Jeet patadiya
Is there any way to handle this from nav c/al code.
Sanjeet,
Use .net Interop to calculate the size of the file using FileInfo Object and then upload the file. For the sample of how to check the file size check below.
Sohail Ahmed
2
mmv
2
Amol Salvi
2