%
Option Explicit
Dim Conn, RS, cStr, strSQL, pdfArray, bPDF
connectDB
strSQL = "SELECT FileID, FileName, FileSize FROM Files WHERE FileArea = '102' ORDER BY FileName"
Set RS = Conn.Execute(strSQL)
If RS.BOF AND RS.EOF Then
'There are no pdf files in the array
bPDF = false
Else
pdfArray = RS.getRows
bPDF = true
End If
closeConnection
Sub connectDB
Set Conn = Server.CreateObject("ADODB.Connection")
cStr = "DRIVER={Microsoft Access Driver (*.mdb)};"
cStr = cStr & "DBQ=" & Server.MapPath("database/thermokingpdf.mdb") & ";"
Conn.Open(cStr)
End Sub
Sub closeConnection
RS.Close
Set RS = Nothing
Conn.Close
Set Conn = Nothing
End Sub
%>