Converting recordset to an array
Hi
Trying to convert a recordset to an array, but I get a "Subscript out of range" error. Below is the code ...
<%
'Create a recordset object instance
Dim objRSExt
Set objRSExt = Server.CreateObject("ADODB.Recordset")
objRSExt.Open "SELECT * FROM FormFormats", objConn, adOpenForwardOnly
'Write form format extensions to an array
Dim arrExt
arrExt = objRSExt.GetRows()
objRSExt.Close
Set objRSExt = Nothing
objConn.Close
Set objConn = Nothing
Dim iExtLoop
For iExtLoop = LBound(arrExt) to UBound(arrExt)
Response.Write "<p>" & arrExt(iExtLoop) & "</p>"
Next
%>
Any help much appreciated.
|