Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
读取结果集的下一行,并将 SADataReader 移动到该行。
Public Overrides Function Read() As Boolean
public override bool Read()
如果还有其它行,则返回 true。否则返回 false。
SADataReader 的缺省位置是在第一个记录之前。因此,必须调用 Read 才能开始对任何数据进行访问。
以下代码使用结果中一列的值填充列表框。
while( reader.Read() ) { listResults.Items.Add( reader.GetValue( 0 ).ToString() ); } listResults.EndUpdate(); reader.Close();