>>>>Hi,
>>>>I need to show "record" counter for the CursorAdapter cursor; for example, "Record 1 of 100."
>>>>I cannot use recno() because the cursor is indexed and recno() does not show in a sequential order.
>>>>I tried to add a "dummy" column to the CA cursor. But I get message that this operation is not allowed for buffered cursor. When I tried to set the buffering to 1 (using CURSORSETPROP("Buffering", 1, "CA_ALIAS") I get message that "Operation is not allowed for CursorAdapter"
>>>>The only option remaining (as far as I can think of) is to add a "dummy" column to the table and use it to assign sequential numbers. Even though the table is not very large,
it would waste database space (this is SQL Server database).
>>>>Any suggestions on how else I can accomplish this?
>>>
>>>
>>>Instead of CURSORSETPROP("Buffering", 1, "CA_ALIAS") try to use CURSORSETPROP("Buffering", 3, "CA_ALIAS").
>>
>>Yes, changing from 1 to 3 allows the CURSORSETPROP() to be executed without an error. However, when I do ALTER TABLE ADD COLUMN ... I get error message that "Function is not supported on remote tables." So I am back to considering a "dummy" column.
>
>Why would adding a calculated field to the cursoradatper SQL Select waste DB space ?
>But if the cursor needs indeces, do you plan to update the recnum field on each setting order differently ?
>Could you use an Order by in the cursoradapter Select and stay with the recnum of the cursor ?
>(Usually your questions draw a clear picture for me, on this one I get a "not enough info" warning)
You are right that the calculated field added to the cursor of CA won't waste space. I meant that if I were to add a physical column to the SQL Server table, then it would be wasted. As I mentioned to Borislav, adding a calculated field to the SQL Select will require some changes to my base BIZ class. But as they say, if there is will there is a way :).
Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham