Forum Moderators: open

Message Too Old, No Replies

Saving Binary data to file

without ADODB.Stream

         

mattglet

1:58 am on Sep 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Please correct me if I'm wrong, but when saving Binary data to a file, is it not correct to use ADODB.Stream now (due to the recent security flaws)?

For example:

Const adTypeBinary = 1
Const adSaveCreateOverWrite = 2

Dim BinaryStream
Set BinaryStream = CreateObject("ADODB.Stream")

'Specify stream type - we want To save binary data.
BinaryStream.Type = adTypeBinary

'Open the stream And write binary data To the object
BinaryStream.Open
BinaryStream.Write Request.BinaryRead(Request.TotalBytes)

'Save binary data To disk
BinaryStream.SaveToFile "c:\myfile.pdf", adSaveCreateOverWrite

If this is in fact not a good idea anymore due to SP2 lockdowns, how else can I obtain the same results? I could be all wrong, and this could be totally acceptable. Just looking for some confirmation.

mattglet

7:11 pm on Oct 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



-bump-