Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to add new records?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00005045
Message ID:
00005067
Views:
24
>Hi Mark,
>
>> I cannot find in the docs (or the books I have) when an insert event originating in a View actually passes through to the base table (except when explicitly instructed via TableUpdate). I'm not even sure if Views were meant to be used as a means to put new records into a base table.
>
>For updatables views of course u can add new records.
>As i understand it the sequence is this:
>1) Insert a record to a view (always in buffer mode,
>since views only work this way). At this point no
>data is appended to base table.
>2) Save buffer changes, either with an explicit TableUpdate
>or moving the record pointer if using buffer-row. In
>this moment data is inserted into base table, and RI,
>default values, field & table validations are executed.
>
>If there were any default values for fields in u're
>base table, u won't see them reflected in u're view
>unless u REQUERY it, after saving the record. (i would
>like to hear if there is another way).
>
>HTH,
>
>J. Luis

this is how i do it, but requery only if/when the user requests it. On decent sized tables, this just takes too long...
Previous
Reply
Map
View

Click here to load this message in the networking platform