const string userName = "ugprs";
const string password = "Sys123456";
const string connectString = "//192.168.0.133:1521/gprs";
oracle::occi::Environment *env = oracle::occi::Environment::createEnvironment("ZHS16GBK","UTF8"); Connection *conn = env->createConnection( userName, password, connectString);
在 蓝色的那行总是连接不上并且出现错误:24960错误,在官方查找的说法是连接字符串长度大于
最大长度,但是定义的长度为255,我的连接字符串没有这么长,怎么处理?还是环境配置有问题了?
用const char* 代替 const string