0

我正在尝试使用 SQLAPI++ 将我的 c++ 代码与 oracle 连接,但它给了我错误 TNS:could not resolve the connect identifier specified

我的代码是这样的:

con.Connect( "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=192.168.1.XXX) (PORT=1521))(CONNECT_DATA = (SERVICE_NAME = SERVICE_NAME )))", "UsrName", "Password", SA_Oracle_Client );

如果我只使用相同的代码但用户名和密码不等于这样:

con.Connect( "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=192.168.1.XXX) (PORT=1521))(CONNECT_DATA = (SERVICE_NAME = SERVICE_NAME )))", "", "", SA_Oracle_Client );

编译器给了我一个ORA-01017: Invalid username / password; connection refused\n错误。

4

0 回答 0