Importing BLOB by SQL view

DHendriksenDHendriksen Member Posts: 32
Hi all,

We are running an interface based on several SQL views. Every 'normal' NAV datatype like, text, code or decimal works fine. But now we have to deal with an image to stream in a blob file. More detailed, we have a SQL Image datatype (a digital signature) which we have to stream/import in an NAV BLOB file, and all this should be done by an SQL view.

We do have experience with BLOB files, streaming and that kind of things, but how can we get the SQL Image and stream this into a BLOB file while using a SQL view.

I really hope that somebody does have some experience.

Thanks in advance.

Don Hendriksen

Comments

  • kinekine Member Posts: 12,562
    1) NAV BLOB is compressed by default. If you want to work with it from outside NAV, you need to disable the compression in field properties.
    2) And how to work with blob from SQL:

    tip:
    UPDATE [table] SET [column] =
    (SELECT *FROM OPENROWSET(BULK 'c:\a.txt', SINGLE_BLOB)AS x )
    WHERE ID = 1;
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.