Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update a field using triggers.
Message
From
01/03/2004 09:52:41
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00882010
Message ID:
00882033
Views:
17
>Hi Hilmar,
>
>It is just an example... The formula is a little bit complicated than it. ;-)

OK, I wasn't sure.

In a similar case, and due to the technical difficulties, I just did the update from the form. If you use a business object, that would probably be the best place to do the update.

>
>But Thanks for your replay... John already answer me that it is not possible.
>
>[]s!
>
>>If your formula is as simple as you post, I would just eliminate the field "Total" from the table, and calculate it (as Total1 - Total2) when you need it.
>>
>>>Hi folks!
>>>
>>>I have a little problem: Imagine one table with just four fields: PrimaryKey, Total1, Total2 and Total... This table had Insert, Update and Delete triggers.
>>>
>>>I just want to calculate Total (using triggers) but I'm receiving an error message: Cannot Update the Cursor.
>>>
>>>In my stored procedure I have the line:
>>>
>>>Replace Total With Total1 - Total2
>>>
>>>
>>>My program runs something like that:
>>>
>>>Begin Transaction
>>>Update MyTable Where PrimaryKey = "BlaBla" Set Total2 = 500
>>>End Transaction
>>>
>>>
>>>I do not use Table or Row Buffer.
>>>
>>>TIA!
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)
Previous
Reply
Map
View

Click here to load this message in the networking platform