Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Basic Cursor Object usage.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00080309
Message ID:
00080344
Views:
27
I think you are confused about what a cursor does. A cursor is just a temporary table, and it is not connected with the original 'real' table(s) from which it was formed. A change in a cursor does NOT update the original data.

What you need instead is a view. A view can be set to update the underlying tables, either in the View Designer or using CursorSetProp() commands programmatically.

Alternatively, you can use buffering, as you suggested, either row or table buffering. In this case, you USE the table, set the buffering to row or table, optimistic or pessimistic, and make your changes. After the changes are made, issue a TableUpdate() command to flush the information from the buffer to the table.

HTH

Barbara

>The following code can create a Cursor(Temp Table) of Actual One.
>
>use MyTable again in 0 Shared
>=Afields(MyTableStru)
>
>Create Cursor cMyTable ;
>From Array MyTableStru
>
>select cMyTable
>Append from MyTable
>* To this line, A Cursor carry all data from Real one.
>
>Append Blank
>Replace MyKey With "YYZ"
>
>Close All && Should Flush in Real one... but fail ?_?' Nothing add!
>
>I want to know how to:
>

    >
  1. Ensure Flush in Real Table?

  2. >
  3. Avoid Update when Close, Something Like TableRevert()?

  4. >
  5. Ensure retrieve if the Real Table is updated by other?
    Escpecially in 2 or more user add record at the same time!

  6. >

>
>Or better use Table Buffering (Row, File Lock) instead of Cursor
>control??
>What are the pons and cons of using Table buffering and Cursor?
>
>Thanks! ^_^"
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform