ASP In-Memory Zip File

liunx

Guest
Hello All,

I have a little ASP reporting page that I have to write, at the moment Im connecting to an Oracle database, to run the reports.

In my oracle database, I have tables that hold binary (BLOB) data for attachments.

At the moment, I can download the attachments using VB, which works fine, but its only ever one file at a time, sometimes there are several files on a report.

I would ultimately like to be able to create an in-memory Zip file, then serve that to the user.

Here is my current VB code: (not complete, but you get the point)

' get the blob length
BlobLength = CDbl(rs("COMMON_FILE_LENGTH"))

' now we need to loop through the blob characters
' and spool
' since there is a set limit on length of varchars
' and adodb does not handle oracle blobs
i = 1

Do While i <= BlobLength

Set rs = oConn.Execute("SELECT dbms_lob.substr(FILE_BLOB, " & max_char_length & ", " & i & ") as COMMON_FILE_VARCHAR FROM WP_ATTACHMENT WHERE FILE_ID=" & CStr(Request("id")))

Response.BinaryWrite rs("COMMON_FILE_VARCHAR")

i = i + max_char_length
Loop




Hope you can help me

Thanks a lot

Mark (kram)Any way you can save the files to disk, zip and then stream that zip to the user and delete after?Yeah I had thought of that, and I might just have to do that.

But of a pitty thoughI use csASPZip and glanced over their manual thinking they have a function whereby you can zip files in memory but no such luck - it wants the files to be somewhere physically.
 
Back
Top