Subject | Re: [ib-support] Master-Detail constraint checking |
---|---|
Author | Jason Chapman (JAC2) |
Post date | 2003-04-28T09:30:27Z |
Helen,
I can't really see how you can do this for N-way accounting transactions.
e.g. a banking sheet may have 200 credits and 1 balancing debit on it.
Personally I have in the past used temporary posting tables with an SP to
post into the main table, the SP can then validate prior to posting in the
actual nominal ledger. There is only 1 temporary table, it can hold many
TX's and you tell it which TX you want to post into the ledger. It checks
and posts or barf's.
HIH
JAC.
"Helen Borrie" >
I can't really see how you can do this for N-way accounting transactions.
e.g. a banking sheet may have 200 credits and 1 balancing debit on it.
Personally I have in the past used temporary posting tables with an SP to
post into the main table, the SP can then validate prior to posting in the
actual nominal ledger. There is only 1 temporary table, it can hold many
TX's and you tell it which TX you want to post into the ledger. It checks
and posts or barf's.
HIH
JAC.
"Helen Borrie" >
> Use triggers to enforce the rules.the
> The trick is to not to post *anything* until you have performed the
> validations - by doing the whole operation in one stored procedure. This
> way, everything is done on the server and the *rules* that control the
> order in which the updates/inserts occur are server based and driven by
> context of the SP.
>
> Make use of After Insert and After Update triggers to enforce your rules -
> which is possible if things are done in the correct order.
>
> Use the powerful custom exception-handling capabilities to deal with
> exceptions which you want your procedure to "eat", rather than throwing
> back to the client; or with validation errors that the SP detects in the
> input, that you WANT to throw back at the client rather than proceed.
>
> heLen
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>