Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "UID=SBFileStream;PWD=cat$web123;DSN=catsWebdataSource_FileStream" -- getting error
strSQL = "select fileattachmentsid,blob,filename,filelength from FILEATTACHMENTS_MEDIUM where LOGNUMBER = "&ActionID& " and COUNTER="&counter
' response.Write(strSQL)
set rs1 = conn.execute(strSQL)
Do while not rs1.eof
equal = rs1(1)
filename =rs1(2)
filelength =rs1(3)
rs1.movenext
FileExt = mid(FileExt, instrrev(FileName,".") + 1)
Response.AddHeader "Connection", "keep-alive"
' Response.AddHeader "Content-Length", filelength
If IsInline = True then
'Allow the browser to render the file inside a browser window (if it can)
Response.AddHeader "Content-Disposition","inline; filename=" & FileName
Else
'Force browser to save file
Response.AddHeader "Content-Disposition","attachment; filename=""" & FileName & """"
End If
Bookmarks