Dim c As New Command
Set c.ActiveConnection = cnc.CommandText = "getbookinfo"
c.CommandType = adCmdStoredProc
c.Parameters.Refresh
c.Parameters("@ISBN") = "7806733957"
rs.CursorLocation = adUseClient
rs.CursorType = adOpenStatic
Set rs = c.Execute
rs.MoveFirst
MsgBox rs.RecordCount
Set c.ActiveConnection = cnc.CommandText = "getbookinfo"
c.CommandType = adCmdStoredProc
c.Parameters.Refresh
c.Parameters("@ISBN") = "7806733957"
rs.CursorLocation = adUseClient
rs.CursorType = adOpenStatic
Set rs = c.Execute
rs.MoveFirst
MsgBox rs.RecordCount
MsgBox rs.RecordCount
看看
sql="select *....."
rs.open sql,conn,1,1
这样就可以用
rs.recordcount了
rs.CursorType = adOpenStatic
这两句拿掉,看看