Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Views and adding records...
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00514463
Message ID:
00514987
Views:
10
Hi!

Not recommended. If the view's key field is updatable, the default function for the INSERT will not be called, if the new record is added into the view by the INSERT command. If you use APPEND BLANK command to add new record to view, even when the field is updatable, default value function will be called for table. Its strange nehavior. You do not require to avoid it, but when avoiding it you will get the regular values, like '1,2,3...', when with additional calling of function from table ID values will look like '1,3,5,7'... - with gaps. You can remove the default function from table only in case you're sure new records will be inserted into table only through view or with already generated ID values.

>Ahh thanks Vlad - so basically the view gets the next primary and the table default is redundant? Could I remove the default in the table?
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform