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:
00005059
Views:
30
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
J. Luis Santiago Rodríguez.• CADIS • E-mail: jlsantiago@iserve.net.mx• Ciudad de México.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform