Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with CursorRefresh after adding a new record
Message
From
06/02/2007 16:01:33
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01192972
Message ID:
01192993
Views:
20
>>>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform