The usual approach to editing and adding records is to use Optimistic Buffering.
Any new record will have a negative recno().
You can confirm the record with TableUpdate(), or undo changes with TableRevert().
Even a deletion requires TableUpdate(), if you use buffering.
The records will not be posted to the server, until you issue TableUpdate().
HTH, Hilmar.
>Hi All,
>
>Up until now to add a new record to the database I would retrieved an empty cursor from the database. I would ask for a record where the numeric field that is the primary index was equal to 0. This way I would have a cursor with the structure I needed. Then just add a blank record. Add the data and save it. Now they tell me that they want to allow internal numbers to be 0 or even negative numbers???
>
>What I’d like to know is. What is the best way to approach this? I still need a cursor with no records.
>
>I'm using VFP6 SP3 to access a VFP database through the VFP ODBC driver.
>
>TIA
>Mike
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)