Why make it so difficult?
VB Code:
Function FetchArray(strQuery As String, conn As ADODB.Connection) As Variant Dim nRS As ADODB.Recordset Set nRS = New ADODB.Recordset nRS.CursorLocation = adUseServer nRS.Open strQuery, conn FetchArray = nRS.GetRows nRS.Close Set nRS = Nothing End Function
EDIT: added some cleanup code




Reply With Quote