Yes, I'm aware of that, but I'm not using Stored Procs ... yet.
>Craig,
>
>Just one suggestion (not a criticism of what you're doing, just a suggestion)...
>
>SQL 2005 contains a new OUTPUT clause that you can include on an INSERT statement in a stored proc - it allows you to get the value of an identity column, without needing to make a round-trip back to the server just to get a PK value.
>
>Whereas previously most people did something like...
>
>
>INSERT INTO MyTable ( ColumnList) VALUES ( @ColumnList)
>SELECT @primkey = SCOPE_IDENTITY()
>SELECT * FROM MyTable WHERE primkey = @primkey
>
>
>
>You can now do this...
>
>
INSERT INTO MyTable (ColumnList) output inserted.* VALUES (@ColumnList)
>
>
>Essentially, SQl 2005 is now allowing developers to query the inserted (and deleted) system tables as part of the OUTPUT clause. The tables were previously invisible outside of a trigger.
>
>
>Again, what you're doing works, just a suggestion for you.
>
>Kevin
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer