If you got a DS Lite, you don't neeed a new friend code. On your old DS, get to the Nintendo Wi-Fi Connection Setup screen and select "Options" (the orange one on the right). Then select "Transfer Nintendo WFC Configuration" (on the bottom). Your DS will tell you what to do then. Don't play any online games on your old DS after that unless you want a new friend code.
This post has been repeated in all the Nintendo WFC game topics.