<% dim ObjRs, strSQL, Txt, cnt, Colour, strWord, strPDF, strWordPath, strPDFPath 'Create the Recordset object set ObjRs = server.CreateObject("ADODB.Recordset") 'Open the connection to the database 'Conn.Open strCon strSQL ="SELECT Title,Description,WordDocument,PDFDocument from downloads where Active=-1" ObjRs.open strSQL,conn,3,1 'Response.Write("Total Records : " & objRs.Recordcount) 'Response.End() %>
Why your help is needed
<% cnt=1 Do while objRs.EOF = false If cnt Mod 2 = 1 then colour = Colour1 else colour = Colour2 end if strWord ="" if len(objRs.Fields("WordDocument")) > 0 then strWord = ("Files/" + objRs.Fields("WordDocument")) end if if len(objRs.Fields("PDFDocument")) > 0 then strPDF = ("Files/" + objRs.Fields("PDFDocument")) end if strPDFPath = "../images/pdf_doc.gif" strWordPath = "../images/word_doc.gif" Txt="" Txt = "" + objRs.Fields("Title") + "" Txt = Txt & "
" & objRs.Fields("Description") if len(trim(objRs.Fields("WordDocument"))) > 0 and len(trim(objRs.Fields("PDFDocument"))) > 0 then 'Response.Write("1") 'Response.End() Response.Write("") Response.Write("") elseif len(trim(objRs.Fields("WordDocument"))) > 0 then 'Response.Write("2") 'Response.End() Response.Write("") Response.Write("") elseif len(trim(objRs.Fields("PDFDocument"))) > 0 then 'Response.Write("3") 'Response.End() Response.Write("") Response.Write("") else 'Response.Write("4") 'Response.End() Response.Write("") end if objRs.MoveNext cnt = cnt + 1 Loop %>
Below are the downloadable documents available at this time.

") Response.Write("
" + trim(Txt) + "
" + trim(Txt) + "
" + trim(Txt) + "
" + trim(Txt) + "
Help
Key :
Word Document
Adobe Acrobat Document

You are required to have the following pieces of software installed to view these files.

Microsoft Word
Microsoft Word is required to view or download this document
Adobe Acrobat
Adobe Acrobat Reader is required to view or print any PDF documents. For information on downloading Acrobat Reader, please click on the Adobe icon below.
<% objRs.Close %>