Searching for folders based on fetched parameters

admin

Administrator
Staff member
Dear Folks,
The following are a section of a script which searches for a student name by fisrtname or surname, then displays any names similar to what was specified, When the user clicks on the required name, the script grabs the student's admission number from a table and seraches the home folder for a share of the admission number. Thsi worked well when I was sharing students admissions number (folders directly.
Recently, I have stopped sharing the students individual folders, rather, I an sharing their year of admiission, which is the parent folder,
I would like to modify the script to serach for a folder with the student admission number throughout all the year groups folders.

I used to have \\homeserver\studentadmission number$ before, now I have reorganised it to \\homeserver\2007$\studentadmissionnumber
\\homeserver\2006$\studentadmissionnumber
\\homeserver\2005$\studentadmissionnumber and so on.

I would like the script to search for a folder with the admission number through the parent folders until it finds the folder with the student admission number.

Maybe it would work better if the script was modified in such a way that instead of fetching just the 'adno', it also fetched the Year of entry, so that I could specify the serach to run in the location \\homeserver\yearofentry\adno.

Thank you for your help.
:crying:




<td width="600" valign="top"> <p><img
src=http://www.htmlforums.com/archive/index.php/"/gfx/Student%20Data%20Gateway.jpg" width="600" height="57"></p> <p
class="NavTableText">Use this page to access students's user areas.</p> <form
action="default.asp" method="post" name="StudentSearch" id="StudentSearch">
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="4" valign="bottom"><img
src=http://www.htmlforums.com/archive/index.php/"/gfx/beveltopw500pxls.gif" width="500" height="7"></td>
</tr>
<tr bgcolor="#C1E3F3">
<td width="5"> </td>
<td width="335"><input name="sname" type="text" id="sname"
size="50"></td>
<td width="156"><input type="submit" name="Submit"
value="Find that Student!"></td>
<td width="4"> </td>
</tr>
<tr bgcolor="#C1E3F3">
<td> </td>
<td colspan="2" class="NavTableText">You may get better
results by entering only the student's surname </td>
<td> </td>
</tr>
<tr>
<td colspan="4" valign="top"><img
src=http://www.htmlforums.com/archive/index.php/"/gfx/bevelbottomw500pxls.gif" width="500" height="7"></td>
</tr>
</table>
</form>
<% If Not RSStudentBySearch.EOF Or Not RSStudentBySearch.BOF Then
%>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="4" valign="bottom"><img
src=http://www.htmlforums.com/archive/index.php/"/gfx/beveltopw500pxls.gif" width="500" height="7"></td>
</tr>
<tr bgcolor="#C1E3F3">
<td> </td>
<td colspan="2" class="NavTableText">Your search
"<strong><%=Request.Form("sname")%></strong>" returned
<strong><%=(RSStudentBySearch_total)%></strong> results </td>
<td> </td>
</tr>
<tr bgcolor="#C1E3F3">
<td width="5"> </td>
<td width="150"
class="NavTableText"><strong>Surname</strong></td>
<td width="340" class="NavTableText"><strong>First Name
</strong></td>
<td width="5"> </td>
</tr>
<%
While ((Repeat2__numRows <> 0) AND (NOT RSStudentBySearch.EOF))
%>
<tr bgcolor="#C1E3F3">
<td> </td>
<td class="NavTableText"><a href=http://www.htmlforums.com/archive/index.php/"\\homeserver\<%=(RSStudentBySearch.Fields.Item("adno").Value)%>$" class="NavTableText"><%=(RSStudentBySearch.Fields.Item("sname").Value)%></a></td>
<td class="NavTableText"><a href=http://www.htmlforums.com/archive/index.php/"\\Homeserver\<%=(RSStudentBySearch.Fields.Item("adno").Value)%>$" class="NavTableText"><%=(RSStudentBySearch.Fields.Item("fname").Value)%></a></td>
<td> </td>
</tr>
<%
Repeat2__index=Repeat2__index+1
Repeat2__numRows=Repeat2__numRows-1
RSStudentBySearch.MoveNext()
Wend
%>

<tr>
<td colspan="4" valign="top"><img
src=http://www.htmlforums.com/archive/index.php/"/gfx/bevelbottomw500pxls.gif" width="500" height="7"></td>
</tr>
</table>
<% End If ' end Not RSStudentBySearch.EOF Or NOT
RSStudentBySearch.BOF %>
<p class="NavTableText"> </p></td>
</tr>
<tr bgcolor="#004A80">
<td height="40" colspan="2"><div align="center"
class="NavTableHeadings">Designed and maintained by the XXXXXXXx!
©2006</div></td>
</tr>
</table>
</body>
</html>
<%
RSFaultsLoggedByLoginName.Close()
Set RSFaultsLoggedByLoginName = Nothing
%>
<%
RSStudentBySearch.Close()
Set RSStudentBySearch = Nothing
%>
<%
RSPageID.Close()
Set RSPageID = Nothing
%>
 
Back
Top