recordset.recordcount返回为-1的解决方法为:首先:打开连接前,设置游标为客户游标,即cnn.CursorLocation = adUseClient,然后,打开recordset时,使用adOpenKeyset或adOpenStatic。
使用connection.Execute CommandText, RecordsAffected, Options
时,可以用RecordsAffected返回操作所影响的记录数目,不过好像只对insert、update、delete等语句有效,select语句无法用次参数返回结果集的行数[@more@]recordset.recordcount返回为-1的解决方法为:首先:打开连接前,设置游标为客户游标,即cnn.CursorLocation = adUseClient,然后,打开recordset时,使用adOpenKeyset或adOpenStatic。
使用connection.Execute CommandText, RecordsAffected, Options
时,可以用RecordsAffected返回操作所影响的记录数目,不过好像只对insert、update、delete等语句有效,select语句无法用次参数返回结果集的行数