Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to add new records?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00005045
Message ID:
00005048
Vues:
31
>I would appreciate hearing suggestions about the best (i.e., safest, highest performance, most bugfree) way of adding new records on a frequent, but one-at-a-time basis, to a shared table.
[...SNIP...]

I'm not sure about the diff. methods, better ask Arnon about these. However, I am familiar with views.

> 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.

Sure they are. Possible problems though may crop up when using sophisticated views (that is, views that perform SQL joins, for example).

>I have come across this unusual error message when I've tried to append a blank record to a view and then do a TableUpdate with the record still blank: something like "Cannot insert a blank record into a view's base table".

This only means that some constraint is acting upon the view's base table that won't allow blank records to be appended/inserted into it. A particular field may be defined as a primary key, for example, and as such can't accept .NULL. values. In this case you'd have to fill up the record first before calling TableUpdate().
alistair israel
Distressed DBA, Sleepy SysAd, Weary WebMaster (aka Senior Software Engineer)
aisrael@poboxes.com
Makati City, Philippines
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform