>I have Buffered table and want to create SQL cursor with current value from it. But when I try:
>
> SELECT CURVAL("MyField","MyBuffTable") FROM MyBuffTable INTO CURSOR MyCursor
>
>but I receive a cursor with number of records as MyBuffTable but with the same value in every record.
>
>TIA
>
Boris,
You can't use a SQL Select on buffered tables because the select performs the equivalent of a USE ... AGAIN on the original table/view. This opens the cursor from disk and your changes are not available. That's the reason you are getting the same value. Since the select reads from a separate alias, the record pointer in the alias you specified remains in the same place.
You will probably have to use one of the xBase commands (e.g. scan/endscan) to go through your cursor and insert the records into another cursor.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao