Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert trigger fails.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Insert trigger fails.
Divers
Thread ID:
00662034
Message ID:
00662034
Vues:
50
I am trying to increment the id column of Table1 every time an INSERT occurs. I have put this code in the stored procedures, and call it from the INSERT trigger.

I get the message "cursor cannot be updated". Does anyone know how to do this right? Maybe someone has a link to code that does this sort of thing.

FUNCTION AutoIncrement()
LOCAL xx[1]
SELECT MAX(id) FROM table1 INTO ARRAY xx
replace id WITH xx[1]+1
RETURN .t.

Regards,

Costas
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform