ReportingAnalyst
MIS
Hi,
I populate a recordset and dump it into an array.
How can I check if a value exist in the array?
I want to check if the c_Member_mgr has a particular value or not?
I populate a recordset and dump it into an array.
How can I check if a value exist in the array?
I want to check if the c_Member_mgr has a particular value or not?
Code:
Dim rs2
set rs2 = Server.CreateObject("ADODB.Recordset")
rs2.open sub_Emp_Source, Conn
Dim aSubordinates
If not rs2.EOF then
aSubordinates = rs2.GetRows()
'Close Recordset to use the new array with the 2 columns data
rs2.Close()
set rs2 = Nothing
'Declare Constants for the above SQL columns for better readability
'Use these Constants instead of referring to the array numeric indexes
Const c_Member_Mgr = 0
Const c_Subordinate = 1
Const c_EmpID = 3
Const c_EmpName = 4