>Hey Daniel,
>
>Actually, inserting and updating views for multiple tables via INSTEAD OF Triggers is one of the touted improvements in SQL 2K. See BOL Designing INSTEAD OF Triggers.
>
OK, my bad (and proving once again that I don't know it all...). Thanks for the reminder.
>For whatever reason, though, no matter what I try, I am unable to get the @@IDENTITY to respond inside the Trigger. The one small example that is in BOL uses a know value (SSN) as the PRIMARY KEY for the first table, and therefore has it's value to put as a link into the 2nd table.
>
>For security reasons (another touted reason for views), I do not want to have the tables written to directly. So far the only other method that I seem to be able to get to work is just using a stored proc to do the insert, and leave the view non-updateable.
>
>Thanks for your input.
In reading that section I get the impression that ID columns are basically off-limits. It may be that, internally, SQL wraps everything in a transaction. However, you COULD have the INSTEAD OF trigger call an SP to do the update.
Dan LeClair
www.cyberwombat.comSET RANT ON - The Wombat BlogLife isn’t a morality contest and purity makes a poor shield. - J. Peter MulhernDisclaimer: The comments made here are only my OPINIONS on various aspects of VFP, SQL Server, VS.NET, systems development, or life in general, and my OPINIONS should not be construed to be the authoritative word on any subject. No warranties or degrees of veracity are expressed or implied. Void where prohibited. Side effects may included dizziness, spontaneous combustion, or unexplainable cravings for dark beer. Wash with like colors only, serve immediately for best flavor.