Rad & Dot Net - Digital Warrior

Assorted ramblings (and vents!!) from a techie on the sunny shores of Kenya, East Africa

Tuesday, February 08, 2005

3D Desktop

Are people getting crazier by the day/ Who on earth would want a 3D Desktop! 2D is cluttered enough as it is! Why would you want this

Thursday, February 03, 2005

Assorted Gotchas

After wasting an entire day debugging one stored procedure, let me share my newly gained wisdom

1) When declaring nvarchar variables never forget to specify the size. If you don't it defaults to one then you will wonder why


select from users where username =@username

returns nothing

2) When you have a stored procedure that calls another, the latter of which returns a value in an ouput paramer, do it like this

declare @ProductID int

exec 
[Products.Insert1,'ACME'
'A generic ACME'1, @ProductID output

select 
@ProductID


and not like this

declare @ProductID int

execute 
[Products.Insert1,'ACME'
'A generic ACME'1, @ProductID 
select 
@ProductID

The difference is the OUTPUT. If you fail to include that little word the output parameter is never populated!