How is the html stored? as an OLE object? or as a Memo Field?
If it's the latter, it's simply a matter of something along the lines of:
Code:
<%
Dim sConnStr
sConnStr = "Some Connection String Connecting to your DB"
Dim sSQL
sSQL = "SELECT HTMLMemoField FROM Table1 WHERE ID=1"
Dim Rs
Set Rs = Server.CreateObject("ADODB.RecordSet")
Rs.Open sSQL, sConnStr, 3, 1
If Not Rs.EOF Then
Response.Write Rs(0)
End If
Rs.Close
Set Rs = Nothing
%>
If you want have the data stored as a file, rather than text, then you'd be after something along the lines of this (which I've just copied from a page I use that connects to SQL Server - same basic premise though)
Code:
<%
Dim ID
ID = Request("ID")
Dim RsFile
Set RsFile = Server.CreateObject("ADODB.Recordset")
RsFile.Open "select FileData,ContentType, FileName from tblFile where FileID = " & ID, ConnStr, 2, 4
If Not RsFile.EOF Then
Response.AddHeader "content-disposition", "attachment; filename=" & RsFile(2)
Response.BinaryWrite RsFile(0)
End If
RsFile.Close
Set RsFile = Nothing
%>
If you're wanting to do it not with ASP - it's a whole different ballgame, and, well, that's a question for another forum.
Steven
I am a loud man with a very large hat. This means I am in charge