Function rowCount()
Dim cnt As Integer
cnt = 0
sqlquery = "enter here Select query"
Set rs = CreateObject("adodb.recordset")
rs.Open sqlquery, con
If rs.BOF = False And rs.EOF = False Then
rs.movefirst
While Not rs.EOF
cnt = cnt + 1
rs.movenext
Wend
rowCount = cnt
End If
Set rs = Nothing
End Function
Dim cnt As Integer
cnt = 0
sqlquery = "enter here Select query"
Set rs = CreateObject("adodb.recordset")
rs.Open sqlquery, con
If rs.BOF = False And rs.EOF = False Then
rs.movefirst
While Not rs.EOF
cnt = cnt + 1
rs.movenext
Wend
rowCount = cnt
End If
Set rs = Nothing
End Function
No comments:
Post a Comment