Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Cursor Adapter adds new rows/records
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01499473
Message ID:
01499482
Views:
88
This message has been marked as the solution to the initial question of the thread.
>Hi,
>
>Do I understand correctly that when a program calls TableUpdate() on the cursor created with CA the new records/rows are added for those records that have no value in the PK field (in case of SQL Server database) or a new value in case of the VFP database?

CA issues INSERT command against backend for records inserted into its cursor regardless of the PK value. The same goes for UPDATE and DELETE respectively.

>
>And if the above assumption is correct, does it mean that I can take a record of the cursor (retrieved) from the base table, blank the PK field, and then TableUpdate() and Cursor Adapter will create a new record in the base table?

No it would be UPDATE because you're doing update on cursors record but it'll most likely fail because PK is wiped out.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform