>if @cVersion not in ('DB4', 'DB5') raiserror ('DATABASE VERSION ERROR!', 127, 1) with nowait, log
OK, you're doing something different. RAISERROR with a severity greater than 19 cause SQL Server to kill the connection. They're considered to be fatal errors!
So, you're statement about it being ugly was very accurate!
-Mike