Discussion:
BlobField and MemoryStream
(too old to reply)
Oliver Fasoli
2008-05-14 15:24:10 UTC
Permalink
Hi all,

I am trying to send files to the user through the web browser:
- The files are stored in a MEMO field in a SQL Server Database
- The files are uploaded from a Win32 application, with the following code:
TBlobField(cdsDocument.FieldByName('M_DOCUMENT')).LoadFromFile(OpenDialog.FileName);
- The same application allows me to re-save down the file on the file
system, with the following code:
TBlobField(cdsDocument.FieldByName('M_DOCUMENT')).SaveToFile(OpenDialog.FileName
+ '_NEW');

It perfectly works in this Win32 Application, but if I try to save the file
through my IntraWeb application (using the same code above) it always create
a 1KB file, corrupted.
Do you know why?

In some webbroker applications I used to send the file to the user using a
stream: Response.ContentStream.
Is it possible to do that in Intraweb?

Thanks,
Oliver
Monte Carver
2008-05-15 17:55:03 UTC
Permalink
Post by Oliver Fasoli
Hi all,
- The files are stored in a MEMO field in a SQL Server Database
TBlobField(cdsDocument.FieldByName('M_DOCUMENT')).LoadFromFile(OpenDialog.FileName);
- The same application allows me to re-save down the file on the file
TBlobField(cdsDocument.FieldByName('M_DOCUMENT')).SaveToFile(OpenDialog.FileName
+ '_NEW');
It perfectly works in this Win32 Application, but if I try to save the file
through my IntraWeb application (using the same code above) it always create
a 1KB file, corrupted.
Do you know why?
In some webbroker applications I used to send the file to the user using a
stream: Response.ContentStream.
Is it possible to do that in Intraweb?
Thanks,
Oliver
Anything you used to do in WebBroker, you can still do in IW. The only difference, is
now you can choose between using WebBroker or IW.


Regards,
Monte Carver

Loading...