[NEWSENDER] - RE: [ASP] Datei aus Datenbank wird nicht angezeigt - Message is from an unknown sender
Alexander Husic
activeserverpages@glengamoi.com
Sat, 24 Sep 2005 17:44:23 +0200
[NEWSENDER] - RE: [ASP] Datei aus Datenbank wird nicht angezeigt - =
Message
is from an unknown sender
Re-Hallo :-)
> Das teil ist von claudius
>
> <%
> DownloadFile Server.MapPath("x.png"), "image/png", ""
>
> sub DownloadFile(file, contenttype, newname)
> dim stream, chunksize, data
> chunksize = 10*1024
> Response.ContentType = contenttype
> if newname<>"" then
> Response.AddHeader "Content-Disposition", _
> "attachment; filename=" & newname
> end if
> Set stream = CreateObject("ADODB.Stream")
> stream.Type = 1 'adTypeBinary
> stream.Open
> stream.LoadFromFile file
> do
> data = stream.Read(chunksize)
> if not isNull(data) then Response.BinaryWrite data
> loop while not isNull(data) and Response.IsClientConnected
> stream.Close
> Set stream = Nothing
> end sub
=C4hm... ich verstehe (leider) nicht ganz, wie mir das helfen kann. Den
ContentType habe ich doch in der DB abgespeichert (siehe prpdDocAplType) =
-
ich möchte also nur diesen Wert hier übergeben...
-> Response.ContentType = (RS("prpdDocAplType"))
Hilf mir bitte - ich mag mich nicht blöd anstellen, nur verstehe ich =
das
wirklich nicht.
Mit freundlichen Grüßen aus Düsseldorf,
Alexander Husic