It would help if you gave us a little more information, such as: what type of DS you're using (DS, DSLite, or DSi), what your network security is (none, WEP, or WPA), and other stuff like that.
Check your wireless router and make sure it's running in 802.11b mode, or b/g mode. It might be called Mixed Mode too. DS only uses b mode and if your router is set for g mode, your DS can't connect.
Try doing this, see if it works.
When configuring your internet settings on your DS, when it asks for an IP Adress at the end use a '2' instead of a '0' or '1'
Subnet Mask 255.255.255.0
Default router & Primary DNS set as your actual IP adress