View Single Post
  #1 (permalink)  
Old February 11th, 2005, 11:41 AM
nancy nancy is offline
Friend of Wrox
 
Join Date: Jun 2004
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default error when sorting an Array of Array

Hi,
Okay I'm using FSO to fetch documents and write then into a table for retreival (my filenames are hyperlinks, too).

I want to add the additional functionality of sorting these results as well.

I was once given a link to a peice of code and while it looks like it might work I'm still having VB sript erros and I am VERY new to VBs.
Here's the error
*******************************
Expected end of statement

/HR/comm_employee.asp, line 240

Dim the Files ( )

*******************************
Here's the code where the error is found:

************************************************** **************

' collect all the info about each file and put it into one
' "slot" in our "theFiles" array.
For Each fileItem in curFiles
    fname = fileItem.Name
    fext = InStrRev( fname, "." )
    If fext < 1 Then fext = "" Else fext = Mid(fname,fext+1)
    ftype = fileItem.Type
    fsize = fileItem.Size
    fcreate = fileItem.DateCreated
    fmod = fileItem.DateLastModified
    faccess = fileItem.DateLastAccessed
    currentSlot = currentSlot + 1

    If currentSlot > UBound( theFiles ) Then
        ReDim Preserve theFiles( currentSlot + 99 )
    End If
    ' here's an array!
    theFiles (currentSlot) = Array' And now a loop for the files

Dim the Files ( )
ReDim theFiles( 500 ) ' arbitrary size!
currentSlot = -1 ' start before first slot(fname,fext,ftype,fsize,fcreate,fmod,faccess)
Next

************************************************** **************

As always your help is most appreciated,
nancy
Reply With Quote