web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Navision 2016 Blob Field Size calculate

(0) ShareShare
ReportReport
Posted on by 2,205

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

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,245 Super User 2025 Season 2 on at

    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.

    www.devx.com/.../calculate-file-size-in-c-161025101007.html

  • sanjeet Profile Picture
    2,205 on at

    Is there any way to handle this from nav c/al code.

  • Verified answer
    Community Member Profile Picture
    on at

    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

  • sanjeet Profile Picture
    2,205 on at

    Thanks Jeet your Solution works for me.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans