VB中判断SQl表是否为空
Subopenrs(rsAsADODB.Recordset,sqlstrAsString)Setrs.ActiveConnection=dbrs.CursorLocati...
Sub openrs(rs As ADODB.Recordset, sqlstr As String)
Set rs.ActiveConnection = db
rs.CursorLocation = adUseClient
rs.CursorType = adOpenDynamic
rs.LockType = adLockOptimistic
rs.Source = sqlstr
rs.Open
End Sub
If rs1.State <> adStateClosed Then rs1.Close
Call bas.openrs(rs1, "SELECT COUNT(*) AS a From table")
反回的 a 为什么是NULL 展开
Set rs.ActiveConnection = db
rs.CursorLocation = adUseClient
rs.CursorType = adOpenDynamic
rs.LockType = adLockOptimistic
rs.Source = sqlstr
rs.Open
End Sub
If rs1.State <> adStateClosed Then rs1.Close
Call bas.openrs(rs1, "SELECT COUNT(*) AS a From table")
反回的 a 为什么是NULL 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询