Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQl com 6 tabelas
Message
De
06/09/2002 07:19:22
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
06/09/2002 06:50:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00697409
Message ID:
00697417
Vues:
16
>Pessoal
>
>Para permitir que o usuário apague um artigo , eu tenho que verificar em 6 tabelas se esse artigo existe lá .
>Basta existir em apenas uma dessas tabelas , e eu não posso deixar apagar esse artigo .
>A pergunta é , tenho que fazer 6 SELECT SQL , ou basta fazer um ?
>
>No caso de bastar fazer um SELECT SQL , como seria a estratégia ?
>
>Muito obrigado aos nossos treinadores em SELECT SQL .

Se a referential integrity estiver corretamente definida, VFP nao vai deixar voce apagar um registro (record), havendo registros relacionados em outras tabelas. Se nao usa buffering, o DELETE nao terá éxito. Se usar buffering, TableUpdate() depois do DELETE nao terá éxito.

E muito mais fácil deixar esto para VFP, a través da referential integrity.

Veja http://www.levelextreme.com/Magazine/June2002/Page21.asp.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform