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:
sConnStr = "Some Connection String Connecting to your DB"
sSQL = "SELECT HTMLMemoField FROM Table1 WHERE ID=1"
Set Rs = Server.CreateObject("ADODB.RecordSet")
Rs.Open sSQL, sConnStr, 3, 1
If Not Rs.EOF Then
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)
ID = Request("ID")
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)
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.
I am a loud man with a very large hat. This means I am in charge