Use of rewind() in CdbDataReader

If CDbDataReader is a forward-only stream which can be traversed only once, then what is the use of the rewind() function associated with that class?

Well it doesn’t work, the reason it is there is because CDbDataReader implements the interface Iterator.

Sometimes we want to implement an interface but not every method, unfortunately the method still needs to be implemented because that is the language rule.

In this case if the reader has already returned a result and rewind is called you will get an exception.

Got it. Thanks.