If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Crecordset::forwardOnly

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-30-11, 09:47
cy163 cy163 is offline
Registered User
 
Join Date: Apr 2007
Posts: 127
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 09:55.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On