Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INSERT not as maintainable?
Message
 
À
26/07/2006 16:22:47
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01140411
Message ID:
01140441
Vues:
17
>>
>>In addition to Cetin:
>>You could easily violate some PK. Try following situation:
>>
>>CREATE CURSOR Test (Fld1 int, Fld2 C(20))
>>INDEX ON Fld1 TAG Test CANDIDATE
>>APPEND BLANK
>>*** Something happens here and the user quit the application
>>
>>*** Next time S/He needs to insetr new record:
>>APPEND BLANK && BOOOOOOOOOOOOOOOOOOOOOOM
>>
>>
>>*** But with this:
>>CREATE CURSOR Test (Fld1 int, Fld2 C(20))
>>INDEX ON Fld1 TAG Test CANDIDATE
>>INSERT INTO Test VALUES (2,-2) && BOOOOOOM, but no record is inserted
>>INSERT INTO Test VALUES (2,[asasa])
>>
>>
>>*** Also:
>>CREATE CURSOR Test (Fld1 int, Fld2 C(20))
>>INDEX ON Fld1 TAG Test CANDIDATE
>>APPEND BLANK
>>INSERT INTO Test VALUES (2,[asasa])
>>BROW NORMAL
>>
>
>
>Buffering removes these concerns as well, no?

O, yes :-)
Buffering and/or Transactions remove all concerns, buy I still prefer INSERT :-)
You could make it more redable with a few comments:
INSERT INTO Test (;
                  Field1,;
                  Field2,;
                  Field3 ;
                  );
            VALUES;
                  (;
                  Expr1,; && Field1 
                  Expr2,; && Field2
                  Expr3;  && Field3
                  )
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform