Size of BLOB field

StyvieStyvie Member Posts: 77
Hi,

We have recently implemented a new customer site, and they wanted the ability to scan their quotes into the database.

They are running Navision 4.0 SP1 (Proprietary)

They scan using a scanner, and then import into the database into a BLOB field.

Currently they have 3000 lines in the table, and have used over 5gb of space in less than a month..

Is there any way to see the size of the BLOB field via code per record, so I can store the value and see if there are any huge attachments in there.

I want something like...

If PurchQuoteDoc.FINDFIRST THEN REPEAT
PurchQuoteDoc."Size of BLOB" = PurchQuoteDoc".Document.Size; ????
PurcQuoteDoc.MODIFY;
UNTIL PurchQuoteDoc.NEXT=0;

I am sure there is some way in Navision to tell ?

Or shall I stream each blob to disk.. calc value and write it in ?

Any other idea's on how to keep these BLOB sizes under control ? at this rate we will hit 65gb in just over a year... ;)

Comments

  • SavatageSavatage Member Posts: 7,142
    maybe you can do something similar..
    I had 1000's of pictures saved in the Item Table's Picture.blob

    but it was eating a ton of space ... so now I have the pics stored outside of NAvision. Now when that item card is opened it checks to see if the pic exists then shows it. It happens instantly.

    for example [Item Card]

    OnAfterGetRecord()
    SETRANGE("No.");
    PictureExists := Picture.HASVALUE;
    IF EXISTS ('P:\'+"No."+'.BMP')
    //p is the mapped drive for our pics & all pics are named by it's item # - that's how we link them.
    THEN
    Picture.IMPORT('P:\'+"No."+'.BMP',FALSE);
    CALCFIELDS(Picture);

    Works Fine.

    & My Database size dropped by 4% after deleting all the item pictures saved in the BLOB
    ---
    OR>> I guess they are scanning them into TIFF's which are usually huge.
    you can download pixresizer or a similar program to reduce there size before importing them or change there format or both in mass - not just 1 at a time.
Sign In or Register to comment.