I guess the real question is whether or not these two issues are related. The first thing you need to do is check to see if your car is truly overheating. Welcome to the days of electronically controlled engines and finding out that not everything is what it seems. Looking though the FSM, it appears that the general cause of this P1217 code is the cooling fans and or their operation. Of course it could be more than that or something really stupid like a shorting temperature sending unit. We really need more information before we can help you out. First, was the air conditioner on when you "over heated", second, is the ac switch on when you are blowing cold air at a stop? The list goes on and on because the car can be in many different configurations. If you have it on defog/defrost, the AC is actually on even if the switch is off. Your best bet is going to this site
Index of /FSM/Sentra and download the EC section and look for your trouble code (around page 428). This will show a series of steps to go through to help isolate possible causes for your problem. It will show steps with the Consult II tool and without. Let us know if you need any help with a steps listed; also be sure to post back with your findings. Good luck.