ORA-12154: TNS:could not resolve the connect identifier specified
which is ridiculous, because the name exists in the tnanames.ora, and the connection details are right. Infact, when I hardcode the values, it goes through fine:
I was in a bit of a hurry, it was just that, I did not receive any sort of activity in my stackoverflow for over 3 days.
I figured what the problem was, the dbName I am passing to the method is a const char *, and when it gets cast to a const string &, it gets an additional character added to the end, which is probably a newline character or something.