I'm trying to connect my c++ code with oracle using SQLAPI++ but it gives me the error
TNS:could not resolve the connect identifier specified
My code is like so:
con.Connect( "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=192.168.1.XXX) (PORT=1521))(CONNECT_DATA = (SERVICE_NAME = SERVICE_NAME )))", "UsrName", "Password", SA_Oracle_Client );
if I only use the same code but the username and password are equal to nothing like this:
con.Connect( "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=192.168.1.XXX) (PORT=1521))(CONNECT_DATA = (SERVICE_NAME = SERVICE_NAME )))", "", "", SA_Oracle_Client );
the compiler gives me an ORA-01017: Invalid username / password; connection refused\n
error.