数据集(如TQuery)对象将数据取回来后,即在open之后,是否必须调用First将游标移到返回第一个记录?否则直接遍历有什么后果?

解决方案 »

  1.   

    不需要,默认情况下,open后的游标就定位在最前面
      

  2.   

    直接遍历就可以,因为Open后记录就是第一个,没必要First
      

  3.   

    不需要 First,默认是 first Record.
      

  4.   

    property Bof: Boolean;
    Description
    Test Bof (beginning of file) to determine if the cursor is positioned at the first record in a dataset. If Bof is True, the cursor is unequivocally on the first row in the dataset. Bof is True when an application
    *****1。Opens a dataset.****
    2。Calls a dataset抯 First method.
    3。Call a dataset抯 Prior method, and the method fails (because the cursor is already on the first row in the dataset).
    4。Calls SetRange on an empty range or dataset.
    Bof is False in all other cases.