>Naomi,
>
>You're right ... it's not 100% bullet-proof. If you check for a duplicate, but don't save right away, someone else may get in a Save with the same ID ahead of your Save. The likelyhood of that happening totally depends on the type of application you're developing, so you should probably have similar code checking for this in your Save DataAccess method, as Evan suggests.
>
>The reason for doing it the way I mentioned is for immediate feedback to the user that they've entered a duplicate ID. Our error checking routines give our controls a red backcolor for an immediate indication that something's wrong.
>
>I probably should have mentioned that to Dmitry. <g>
>
>~~Bonnie
>
Yes, that's what I meant. Looks like combination of both approaches would be the best.
BTW, just curious, do you prefer to write your SP code in CLR or in T-SQL?
I'm reading 'Programming in SQL Server 2005' book now and like it so far. BTW, I know the authors from NYC .NET User Group :)
If it's not broken, fix it until it is.
My Blog