Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
Fadilk

Member
Registered:
Posts: 25
Reply with quote  #1 

Hi,

I have been trying to FileStream an attachment from the eAttachment table into a folder.
The streaming works but the doucment seems corrupt after downloaded (does not open, it is a pdf).
Has anyone tried this before?

The eAttachment table column is type image which means that you should be able to stream the attachments out using c# FileStream. Unless there is encoding issues.

Just wondering..

Thanks

0
Fadilk

Member
Registered:
Posts: 25
Reply with quote  #2 
ok, FileStream works.  Just not for pdf's so far :(
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #3 
I think you will find it does not work. If it does, it is probably a text file, and it is really working by accident.

The data is turned into two-char hexadecimal ascii bytes. There is also a header, but I do not know what it should contain.

My advice is, and always has been, use the supported functionality. Anything else will cause pain. If you really want to do it outside of the Metastorm engine (where properly supported functions exist) then use the SDK.

To see how that may be used, have a look at the FreeFlow .net framework. It only supports version 7, but I don't think that code has changed much in version 9:
http://freeflow.codeplex.com/

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
Fadilk

Member
Registered:
Posts: 25
Reply with quote  #4 
correct you are I have discovered.
The goal was to test whether I could bulk copy eAttachment files into a separate database and table having an image column.  I couldn't extract the file from the eAttachment table using plain code, which will mean that if I had copied image column to image column, the documents would not be extractable. 
Will have to use GetAttachment() to c:\temp and then FileStream back into my third party database.

Tx
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #5 
Quote:
Originally Posted by Fadilk
correct you are I have discovered.
...
Tx


That's OK, Yoda ;-)

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!