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.