Hi,

I'm developing an application (using Visual C++ 6.0) which access SQL Server
via OLE-DB.
So I'm having a trouble using block-cursor.

I use dynamic forward-only cursor (with pessimistic lock), and I use the
pRowset->GetNextRows(DB_NULL_CHAPTER, 0, 10 ..... in order to get work with
block of ten rows.
The 1st scenario is:

1) I execute the query, and I retrieve the first ten rows of the rowset.
In the profiler I can see the cursor API:

sp_curoropen ....
sp_cursorfetch ... 1,10

I consume the first ten rows, then I get other ten rows calling the
pRowset->GetNextRows(DB_NULL_CHAPTER, 0, 10 .....
In the profiler I see

sp_cursorfetch .... 10, 10

and so on, till the end of the rowset.
In this scenario I don't change any row, and everything seems OK.

If I try to change one column of every row, I have the following scenario...

2) I execute the query, and I retrieve the first ten rows of the rowset.
In the profiler I can see the cursor API:

sp_curoropen ....
sp_cursorfetch ... 1,10

I change one column on every row (IRowsetChange::SetData).
I can see in the profiler the cursor API (for every row changed):

sp_cursor ......

Well,I consume the first ten rows, then I get other ten rows calling the
pRowset->GetNextRows(DB_NULL_CHAPTER, 0, 10 .....
In the profiler I see

sp_cursorfetch .... 10, 10

But I don't get the second decade of row, I get the third one !!!!
For example If my query involves 100 rows, in the firs scenario I can work
sequentially on every row from the first to the last (retrieving block of
ten rows).
In the second scenarion I get block of ten records but I obtain ten rows
from the 1st row to the 10th row, from the 21th row to the 30th row,
from41th row to 50 row ... and so on.

How can it be ?
What do I obviosuly cannot understand using block cursor ?
Someone can help me ?

Thank you very much.
Porlock.