>Hi,
>I am developing stock control system.
>I would like to know, where should I place the code of increase/decrease stock?
>Do you think place code in insert/update/delete trigger in every relevant table such as stockin, sales, good return and etc to increase/decrease stock qty is a good ideas?
>What about place it in data object .. and real world sample?
>
>Thank you
I do this through triggers. That way, you can be sure that no matter where you do the change, the other table will be updated.
Updating stock is precisely the example I used in my article on triggers:
http://www.levelextreme.com/Magazine/June2002/Page21.asp.
HTH,
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)