import file to database

ASTAST Member Posts: 108
Hi,
It is possible to import all kind of files (eg. pdf, excel,..) to database? I don't mean import path to file, but just file (as blob?).

Comments

  • Dave_CintronDave_Cintron Member Posts: 189
    Yes, you can import anything, but to view it you will need to re-export and hyperlink to it.
    Dave Cintron
    Dynamics West
    http://www.dynamicswest.com
  • WaldoWaldo Member Posts: 3,412
    It's just the same as importing a .bmp into a blob.
    With the MyTable.MyBlobField.EXPORT you can put it back to a file.
    You should save the name and extension though if you want to reconstruct the file name.

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • garakgarak Member Posts: 3,263
    edited 2008-04-10
    but note :!: If you have an SQL Datebase (equal native) it is not a good idea, to store the Files in the blob field. Its better to create a text field in the table and store there the UNC path.

    Why? Because Navision, makes these kind of queries on sql.
    select *, Datalength(YourBlobField) from TableXYZ ....
    

    If you have there a lot of records in your table and these recs have big BLOBs, then the querries are not the fastest.

    How to store UNC, see my post here
    Do you make it right, it works too!
  • garakgarak Member Posts: 3,263
    if you import the file or the unc path to the file, open the file not with hyperlink, use WSH. Its better ;-)

    see this post. Here the user can also use the open with function.

    http://www.mibuso.com/forum/viewtopic.p ... light=open
    Do you make it right, it works too!
  • ASTAST Member Posts: 108
    Thanks for all replaying :)
Sign In or Register to comment.