<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/connCompass.asp" -->
<%
Dim Results__MMColParam
Results__MMColParam = "1"
if (Request.QueryString("DEPARTMENT"

<> ""

then Results__MMColParam = Request.QueryString("DEPARTMENT"

%>
<%
set Results = Server.CreateObject("ADODB.Recordset"

Results.ActiveConnection = MM_connCompass_STRING
Results.Source = "SELECT EMPLOYEEID, FIRSTNAME, LASTNAME, DEPARTMENT, EXTENSION FROM EMPLOYEES WHERE DEPARTMENT = '" + Replace(Results__MMColParam, "'", "''"

+ "'"
Results.CursorType = 0
Results.CursorLocation = 2
Results.LockType = 3
Results.Open()
Results_numRows = 0
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
' set the record count
Results_total = Results.RecordCount
' set the number of rows displayed on this page
If (Results_numRows < 0) Then
Results_numRows = Results_total
Elseif (Results_numRows = 0) Then
Results_numRows = 1
End If
' set the first and last displayed record
Results_first = 1
Results_last = Results_first + Results_numRows - 1
' if we have the correct record count, check the other stats
If (Results_total <> -1) Then
If (Results_first > Results_total) Then Results_first = Results_total
If (Results_last > Results_total) Then Results_last = Results_total
If (Results_numRows > Results_total) Then Results_numRows = Results_total
End If