Recordset to Array function
Function RecordsetToArray(ByVal sConn, ByVal sSQL)
Dim cnRTA, rsRTA
Set cnRTA = Server.CreateObject("ADODB.Connection")
cnRTA.Open sConn
Set rsRTA = cnRTA.Execute(sSQL)
If Not rsRTA.EOF Then
RecordsetToArray = rsRTA.GetRows
rsRTA.Close
cnRTA.Close
Set rsRTA = Nothing
Set cnRTA = Nothing
Else
rsRTA.Close
cnRTA.Close
Set rsRTA = Nothing
Set cnRTA = Nothing
RecordsetToArray = Null
End If
End Function![]()