Public Function GetRows(agrRs)
If Not agrRs.Eof Then
GetRows = agrRs.GetRows()
ArrNum = Ubound(GetRows,2)
else
ArrNum = -1
end if
agrRs.Close : Set agrRs = Nothing
End Function
将表读出后对象传入,转化为数组,取出下标,并关闭数据库!
Public Function GetRows(agrRs)
If Not agrRs.Eof Then
GetRows = agrRs.GetRows()
ArrNum = Ubound(GetRows,2)
else
ArrNum = -1
end if
agrRs.Close : Set agrRs = Nothing
End Function