Herman,

If you find that it works out for you in the simple case, you can add 
additional fields to the in memory record structure, parse your line 
of data into the separate fields, then use any of those fields as the 
field to sort on. You can then define a variable in AFL for which 
column you want to sort with and reference that variable within the 
vbscript.

Modifying the script given, it might look something like this:

// SortColumn declared in AFL as a String
SortColumn = "Symbol"; // Must match one of DataList.Fields

<%
...
Set DataList = CreateObject("ADOR.Recordset")
DataList.Fields.Append "Symbol", adVarChar, MaxCharacters
DataList.Fields.Append "Open", adVarChar, MaxCharacters
DataList.Fields.Append "High", adVarChar, MaxCharacters
...
DataList.Open
...
Do Until objFile.AtEndOfStream
strLine = Split(objFile.ReadLine, ",")
DataList.AddNew
DataList("Symbol") = strLine(0)
DataList("Open") = strLine(1)
DataList("High") = strLine(2)
...
DataList.Update
Loop
...
DataList.Sort = AFL("SortColumn")
...
%>

Again, I haven't actually tried any of this. But, it looks like it 
should work.

Mike







Reply via email to