Recordcount = -1 problem

xiaoxiao2021-03-06  70

Self-developed blog: http://www.ylhd.com/aa7643/dds_blog/ Usually people use two methods to perform SQL statements: SET RS = conn.execute (SQLSTR) and SET RS = Server.createObject ("AdoDB .Recordset ") RS.Open SQLSTR, CONN, CURSORTYPE, LOCKTYPE

(Recordset object method, please see here)

Since the default recordset is a server cursor, rs.cursorLocation = aduseserver is returned to RS.RecordCount = -1, and the server cursor should be changed to the client game, RS.CursorLocation = Aduseclientrs.open Sqlstr, Conn, Cursortype, LockType

Rs.cursortype

Cursor Type Recordcount Properties ------------------------------------------- Forwardonly 0 (default) Returns -1 KeySet 1 The correct record number Dynamic 2 -1 or incorrect record number, according to the data source, Static 3 correct record number

So rs.cursorlocation = 3

This property is supported by the RecordSet.support ("Property Name").

转载请注明原文地址:https://www.9cbs.com/read-121812.html

New Post(0)