>>>>Hi,
>>>>
>>>>I have a couple of questions on using Auto Inc field. I have never used them before and consider adding/using for a table that currently has no PK field. So I want to add
>>>>
>>>>1. Will a table with an Auto Inc field work with a cursor adapter? That is, can I add/edit/delete records in this table via cursor adapter object?
>>>
>>>Yes. You have to get the "real" PK value after insert operation if the newly created CA record needs it elsewhere (as a FK in parent-child relations).
>>>>
>>>>2. Do you find that adding an Auto Inc field make the table more susceptible to corruption (than table without such field)?
>>>
>>>corruption no. But if the seed value is/turns somehow wrong, you have to take action, as the table might be insert-blocked.
>>>Also slightly more work if appending is part of the tasks.
>>
>>Thank you very much for your answers. The last part of what you said, "if something goes wrong" concerns me. How do you rectify the situation. I guess I will need to think of a way to simulate the problem and then create an approach of fixing it.
>
>You reset/reseed it to a value > max(autoincvalue)
Thank you. I will see VFP Help on how to reset/reseed the value. I appeciate your help.
"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