Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moverbar in Grids??
Message
 
 
To
16/09/2010 04:54:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01349413
Message ID:
01481426
Views:
66
>I found a problem with this implementation for my particular case. I use a form with a grid and I add records to it. The newly added records don't have ID field populated and therefore this code doesn't work. Do you have an idea of solving the problem?
>
>The class was designed with the assumption that each record has a PK. Otherwise, how can you possibly identify which record you are moving? Give each newly added record a PK and the problem is solved.

Hi Marcia,

The problem may arise when you use an updatable view or a cursor adapter and insert new records. In this case the PK is not yet populated.

For my case, luckily, I was able to solve the problem by generating the PK value (I was using a cursor).
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform