Well there are a few things, taking both the SD card out and the card out the ds and bowing into the DS and card
Then wipe the bottom the MircoSD card lightly with like your shirt or cloth for a few seconds.
The reinsert them into the DS. It should work better then
Or do all that, but take a q-tip and spray one end down with WD-40 and rub the bottom of it for a little bit, then dry it off with the other end.
Someone told me to do that once when I had the same problem and I never had the problem since