you have to log into your router, if you tell us what router, we may be able to help you better.
Nintendo DS is known to have issues connecting to some routers as well. so even with the WEP key set, you may still be out of luck(SMC BARRICADE G is out of luck).
WEP is an older way to secure wireless networks, it is a shame Nintendo never moved to WPA or something better.
If all else fails, you can always get a Nintendo wifi stick at the store. those always work