Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making sure one occurence of the record is created
Message
De
25/04/2003 18:10:24
 
 
À
25/04/2003 18:00:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00781704
Message ID:
00781743
Vues:
17
>set a temporary error routine, attempt the INSERT, and trap for error 1884.
>
>This might be great for the new TRY/CATCH in VFP8.

I have done a simple cursor with an index on candidate. Here's the code:
TRY
   MESSAGEBOX('Attempt')
   INSERT INTO Temp (Numero,NoProvince) VALUES (1,1)
   MESSAGEBOX('Executed')
CATCH
   MESSAGEBOX('Failed')
ENDTRY
On the first run, it inserted the record. On the other run, it failed. All is working ok. I'll try that in the application.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform