Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » UltraLite - .NET 编程 » UltraLite .NET 2.0 API 参考 » ULDataReader 类

 

GetRowCount 方法

返回表或结果集中行数的计数。在只需要确定存在超过指定数量的可用行的情况下,为避免枚举所有的行,这时可指定阈值。例如,应用程序正在显示来自 10 个行中的信息,它可能想知道是否存在 10 个以上的可用行,以便能够为用户显示更多信息提供选择。

语法
Visual Basic
public int GetRowCount( _
ByVal threshold as Integer ) _ 
as Integer
C#
public int GetRowCount( int threshold );
返回值

如果阈值参数为零(无阈值),返回的结果是表或结果集中的行数;否则,表或结果集中的返回行数最多是阈值的最大值。

注释

对于较大的表或结果集,枚举其中的所有行是一项高开销操作。如果应用程序只需知道是否存在超过指定数量的行,则可使用此方法。