I am am beginner to db programming and I am using OCCI to connect to a oracle db . I have Oracle 11g admin installation on Windows 64 and I am using Visual studio 2005 on Win 7 64 bit.
I am trying to make a simple connection using the OCCI but I get the following error
const std::string lUserName = _T("abcdef");
const std::string lPassword = _T("abc12345");
const std::string lServerName = _T("");
lpConnect = lpEnv->createConnection(lUserName, lPassword);
ORA-24960: the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255
It looks like the character string is getting corrupted and I dont know if this ia a problem with visual studio compile options or something else. Also, I did read that we need to use the server name in the tnsname.ora . I havent used any. Is that the reason for the problem?
You need to verify which version of VS was used to build oraccci11.dll and ensure you use the same version to build your application.
I have seen similar error message if you end up using a version different of VS than what was used to build oraccci11.dll to build your application.
BTW look at the below site to download occi dlls built using different version of Visual Studio.