stream excel sheet from binary database to the browser

P

Pedro Leite

hello.

got stalled at at point that i can no longer get my thoughts together.

the point, is in classic asp, stream an excel file from a firebird database.
temporarly save it if necessary
stream it to the browser
delete the temp file

on googling, i found some examples but all assuming that the file is locally
present.
on the other hand, i beleive that is possible to stream the binary file and
the save it locally to then present it to the browser, but i can't figure
out how.

anyone would help me on this ?? firefox friendly if possible.

thank you in advance

Pedro Leite From Portugal.
 
P

Pedro Leite

i got this far

with this code, i can gat the excel file from the database and present it on
ie or pop the download box in ff
-------------------------------------
Response.Buffer = True
' Connection String
Dim connStr
connStr = "Provider=MSDASQL.1;Extended
Properties=Driver={Firebird/Interbase(r)
driver};Dbname=xxxxx-xxx:/xxx/xxx.gdb;CHARSET=ISO8859_1;PWD=xxxxxx;UID=xxxxx"
' Recordset Object
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
'Response.ContentType = "image/jpeg"
' opening connection
rs.Open "SELECT NOME_FICHEIRO,NOME_LOGICO, FICHEIRO FROM TCS_XIBFS
Where NOME_LOGICO = '" & request.querystring("doc") & "'", connStr, 2, 4

Response.Clear()
Response.ContentType = "application/x-msexcel"
Response.BinaryWrite rs("FICHEIRO")
Response.end
----------------------------------------
Now, i would like to save the binary file in the client computer.
been searching and found the binarystream object and tried this but no good
'BinaryStream.Type = adTypeBinary
'Open the stream And write binary data To the object
'BinaryStream.Open
'BinaryStream.Write rs("FICHEIRO") <-- this comes from the data base.
'Save binary data To disk
'BinaryStream.SaveToFile "c:\x.xls", adSaveCreateOverWrite

anyone would please point me on the right direction ??

thank you in advance

Pedro Leite
----------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top