Recently I had a bit of trouble connecting to a database from a web server. All parties involved had done their part as far as opening ports, database clients were in place (Oracle) and it seemed that we were good to go.
Using old and tried tools like IpConfig, Tracert, Ping and PathPing came to the rescue. While these are not programming tools per se, they are often used by System Admins and Network Engineers, it does not hurt to know their use.
So on this little discovery I found out that the IP address of the database we were trying to connect to was completely wrong. Once I corrected that, other issues had to be solved.
Now that we knew we had the righ IP Address, we were still not connecting. After delivering some information obtained via Tracert, we were able to determine what the problem was. The ports on the web server had been opened on the wrong subnet IP Address.
You may have your code ready to go but simple old tools like the ones above saved the day.
If you need a refresher on what this tools do look up this link: Trace Route