I've tried setting up an array to collect all the unique file types, this is what I have got so far:
------------------------------------------------------------
form_CustID =request.querystring("id"
strSQL = "Select FileName from FileDescription where CustId = " & form_CustID
Set rsFiles = Server.CreateObject ("ADODB.Recordset"

rsFiles.Open strSQL ,"DSN=Architron; UID=sa; PWD="
If rsFiles.eof then
%>
<table align= "center" cellpadding="1" cellspacing="1" BORDER="0" WIDTH="800" >
<tr valign=center><td align=center BGCOLOR="#99FF99" ><h4> | Customer ID: <% response.write rsCustomer("CustID"

%> | | Customer Name: <% response.write rsCustomer("CustName"

%> | Customer has no backed up files </h4><td></tr>
</table>
<%
Else
rsFiles.MoveFirst
<<< this counts how many records have been found >>>
connectme="DSN=Architron;uid=sa;pwd="
sqltemp="Select FileName from FileDescription where CustId = " & form_CustID
set rstemp=Server.CreateObject("adodb.Recordset"

rstemp.open sqltemp, connectme, adopenstatic
howmanyrecs=rstemp.recordcount
response.write howmanyrecs & " records in<br>" & sqltemp
rstemp.close
set rstemp=nothing
<<< pointer to increment array >>>
arrayinc=0
%>
<table align= "center" cellpadding="1" cellspacing="1" BORDER="0" WIDTH="800" >
<tr><td align= "center" width="70" bgcolor=#CCCCCC >File Types</td></tr>
<%
While not rsFiles.EOF
<<< finds the file extension >>>
file = rsFiles("FileName"

rtn = InStr(1,file, "."

if rtn > 0 then
extension = Right(file, (Len(file)-rtn+1))
end if
<<< loops used to compare two srings together >>>
for l=1 to howmanyrecs
<<< if extension tyoe already in array then exit loop >>>
if extArray(l) = extension then
exit-loop <<< code to exit the loop >>>
else
<<< otherwise add extension to array >>>
arrayinc= arrayinc+1
extArray(arrayinc)= extension
exit-loop <<< code to exit the loop >>>
end if
next l
rsFiles.MoveNext
wend
%>
------------------------------------------------------------
Most of the code is in pseudocode and needs to be put into asp code, I was wondering if someone could help me do this and correct any problems they see with the code?
Grateful for any help.
Thanks.
Taha