Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursor cannot be modified because it contains an unsaved
Message
From
30/10/2014 09:00:30
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MySQL
Application:
Desktop
Miscellaneous
Thread ID:
01610155
Message ID:
01610199
Views:
33
>>From time to time I get an error when I try to replace a field when editing a cursor in a grid.
>>The cursor is a view with tablebuffering = 5 created from a SQLEXEC() query.
>>
>>Cursor cannot be modified because it contains an unsaved record
>>
>>Any has seen this before and knows how to work around this error?
>
>Usually that happens when you try to Refresh Cursor (or REQUERY View) when they contains modified records, before you issued TABLEUPDATE() or TABLEREVERT()

Thanks, but there was really no Refresh or Requery happening, only a replace. After a long search I found out the culprit. In the grid there is a DynamicCurrentControl and if the current control is empty, then the error would occur. So it's a bug related to the grid. I solved it by creating a dummy object to display instead of leaving the control empty.
Christian Isberner
Software Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform