Options

Appending Multiple Files to a BLOB field

rjsfrjsf Member Posts: 17
edited 2014-01-10 in NAV Three Tier
I'm trying to find out if this is possible and if anyone has done this before.

I have a requirement from my client for the users to be able to upload pdf files into a field in a table.
I'm sure the stream functions can handle it.

However, sometimes the users would like to upload multiple files at a time.

Is there a way to combine multiple files together into one BLOB field in one record?
And is there a way to "uncombine" them later for extraction?
Or there is no choice but to have them in multiple records?

Comments

  • Options
    postsauravpostsaurav Member Posts: 708
    Hi,

    I don't think that it is possible to upload multiple files in a single BLOB Field.

    But there is a way around how you can achieve it -

    * A sample for having attachment in Purchase Document.

    1) Create a new table with fields Document Type, Document No., Line No, & Attachment (BLOB Field)
    2) Primary Key Document Type, Document No., Line No.
    3) Whenever users import a new file increment the Line No and store the File.

    Let me know if my understanding is correct.

    Thanks & Regards,
    Saurav Dhyani

    Do you Know this About NAV?


    Connect - Twitter | Facebook | Google + | YouTube

    Follow - Blog | Facebook Page | Google + Page
  • Options
    thegunzothegunzo Member Posts: 274
    Hi,

    There is a way. You can use Archive (zip) methods in .net 4.x to create a single zip file with many pdf documents. This zip file can be stored in a single BLOB field.
    ________________________________
    Gunnar Gestsson
    Microsoft Certified IT Professional
    Dynamics NAV MVP
    http://www.dynamics.is
    http://Objects4NAV.com
Sign In or Register to comment.