I'm getting the following exception "ORA-24960: the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255" when using Environment:createConnection.
I'm using VisualC++ 8.0 and Oracle 10g R 10.2.0.


Below is the snippet of code that creates the problem:

#include <iostream>
#include<occi.h>
using namespace oracle:cci;
using namespace std;

try{

Environment *env = Environment::createEnvironment(Environment:EFAULT);
Connection *conn = env->createConnection ("scott","tiger");

}
catch(SQLException ex)
{
cout << ex.getMessage(); //throws 24960 error 
}

Recommended Answers

There's a typo in your code. I think you mean Environment::DEFAULT instead of Environment:EFAULT . I never heard of the second anyway ;)

Jump to Post

All 4 Replies

There's a typo in your code. I think you mean Environment::DEFAULT instead of Environment:EFAULT . I never heard of the second anyway ;)

Environment *env = Environment::createEnvironment(Environment:: DEFAULT ); i type but same problem

Here's a related thread, maybe it can help you

and this will help everyone a LOT !!!

code Tags

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.