-
November 3rd, 2007, 10:12 PM
#1
oracle 10g error 24960
If i compile with visual c++ 6.0 or 2005 i get the same problem.
/////////
string user = "system";
string passwd = "xxx";
string db = "Testx";
try{
env = Environment::createEnvironment(Environment: EFAULT);
conn = env->createConnection(user,passwd,db);
}catch(SQLException ea)
{
cerr << ea.getMessage() << endl;
}
//////////
the message is "ORA-24960: the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255"
I have tried downloading the library's on oracle.com for the 8.0 version but the error doesn't not change. I am pretty sure that I included all of the correct directories into the project.
I also added the directory to windows PATH but then I get msvcrt80.dll missing error.
-
November 4th, 2007, 10:08 PM
#2
Re: oracle 10g error 24960
Are U sure that createConnection expects parameters of type "string"?
Message "ORA-24960: the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255" indicates that it is not true.
;-)
try to hardcode invocation just to see if that is a problem - for example:
Code:
conn = env->createConnection("system","xxx","Testx");
Best regards,
Krzemo.
-
November 5th, 2007, 04:23 AM
#3
Re: oracle 10g error 24960
I've tried that but it is still the same exception at runtime.
The code itself should be fine since it is just a pared down version of a sample off of the oracle website.
-
January 29th, 2009, 05:42 AM
#4
Re: oracle 10g error 24960
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
}
-
May 26th, 2023, 05:33 AM
#5
Re: oracle 10g error 24960
 Originally Posted by manic dude
the message is "ORA-24960: the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255"
Using the debug library (oraocci11d.lib, vc9; NOT oraocci11.lib) for the debug mode did the trick for me (Toolset VS2008 [v90] in VS2017).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|