>>>>>Hi everybody,
>>>>>
>>>>>It looks like I can not call a CursorRefresh after a new record was added, but have to do a CursorFill instead. My problem is the following:
>>>>>
>>>>>I have a parent grid and a child grid both bound to different CAs. When I navigate through parent grid I call child's CA CursorRefresh and everything is fine. My problems starts when I add a new record into the child table and save the information. Now CursorRefresh does nothing and the child grid still shows the last added record.
>>>>>
>>>>>Is it a bug? How should I workaround the problem if I don't want to lose my grid's controlsources?
>>>>>
>>>>>Thanks a lot in advance.
>>>>
>>>>What AERROR() said after CursorRefresh()?
>>>
>>>Ok, I'm back to square one with the original problem of AutoInc field <g> Since I'm using VFP8, I save the current ID by reading it from the table in AfterInsert and in my Save method I replace ID with the saved ID in CA.Alias and reset setfldstate for the PK field. Somehow it's not enough and I now get this error message. So, the question goes back - how can I "refresh" my CA AutoInc field in VFP8.
>>
>>Didn't you decide that AfterInsert is not safe and so you will use 'nextid'?
>
>I changed my mind <g>, but looks like I just prolonged the agony...
Frankly, I read these cursoradapter threads with some level of amusement that so much stuff is needed for rather simple interface. One should wonder how was it possible to write VFP applications before cursoradapter appeared.
Edward Pikman
Independent Consultant