Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert trigger fails.
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00662034
Message ID:
00662041
Views:
19
See http://www.craigberntson.com/Articles/kb006.htm



>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform