Results 1 to 1 of 1
  1. #1
    Join Date
    Apr 2007
    Posts
    130

    Unanswered: Crecordset::forwardOnly

    Hi, ALL

    My question is about Crecordset::forwardOnly|dynaset|dynamic,
    I am using VC to access DB2. The SQL command is executed using following code
    Code:
    csString csSQL = "SELETCT  Birthday FROM   tbl  ORDER BY   Birthday";
    CRecordset rds(CDatabase * m_DB);
    rds.Open(CRecordset::forwardOnly, csSQL, CRecordset::readonly );
    The code works fine. However one error occurred when I change
    Code:
    rds.Open(CRecordset::forwardOnly, csSQL, CRecordset::readonly );
    into
    Code:
    rds.Open(CRecordset::dynaset, csSQL, CRecordset::readonly );
    I would like to use CRecordset::dynaset, since CRecordset::forwardOnly does not support the following command
    Code:
    rds.Move(10, SQL_FETCH_ABSOLUTE)
    Last edited by cy163; 07-30-11 at 10:55.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •