cplusDBAction 4.2                                                                                        Copyright addoit GmbH 2009

 

 

5.6.1 Cursor Iterators

In Picture 8: A Simple Select Query on a Table you can see a sample of how to iterate through the DeclarationType Container (Line 105) using its internal cursor. MoveNext() moves the internal cursor on step further until it reaches the beginning or the end of the collection, depending on the iteration direction defined through the parameter _ENUM_CURSOR_TYPE (see Picture 10: Cursor Types).

 

033:    typedef enum{

034:       EN_FORWARD_CURSOR   = 0,

035:       EN_BACKWARD_CURSOR  = 1,

036:       EN_UNKNOWN_CURSOR   = 2

037:    }_ENUM_CURSOR_TYPE;

 

Picture 10: Cursor Types

 

Before iterating a second time through the same container, the cursor must be initialized using the CursorInit() method.

 

Related Topics

5.6 Table Container


Copyright (c) 1998-2009 addoit GmbH, All Rights Reserved.

www.addoit.com                                                                                                          Page 1 of 52