Created
September 21, 2017 19:00
-
-
Save marcelodeandrade/c8dffb2ae89dee6781ef69b47e759fd8 to your computer and use it in GitHub Desktop.
Get a recordset and use getRows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function GetRSArray(strSQL) | |
Set objRS = Conn.Execute(strSQL) | |
If Not objRS.EOF Then arrRS = objRS.GetRows() | |
Set objRS = Nothing | |
GetRSArray = arrRS | |
End Function | |
arrRS = GetRSArray("SELECT ID, Name FROM users;") | |
If IsArray(arrRS) Then | |
For i = LBound(arrRS, 2) To UBound(arrRS, 2) | |
ID = arrRS(0, i) | |
Name = arrRS(1, i) | |
Response.Write("<p>" & Name & " (" & ID & ")</p>" & vbCrLf) | |
Next | |
Erase arrRS | |
End If |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment