0

I am using following simple code to connect to database and I am getting error as ORA-24399 which says invalid number of connections specified. I have googled enough but not clue. This is a CPP program.

Following is code Snippet:

try
{
        Environment *env = Environment::createEnvironment(Environment::DEFAULT);
        Connection *con= env->createConnection("test","test","testdb");
}
catch(SQLException ex)
    {
        cout<<ex.getMessage().c_str();
    }

P.S Using SQL Plus I am able to connect to the database where this code is being run. There are no issues there. Only through program there is a failure seen.

P.P.S Tried using connectionpool as well but still no luck...

user2419621
  • 41
  • 1
  • 6

1 Answers1

0

Looking at your error, it seems that the problem is somewhere else in your code: you should fix the parameters (related to connection numbers) in the call to OCIConnectionPoolCreate.

n0p
  • 3,399
  • 2
  • 29
  • 50
  • Ya I agree...but my code is that much only..this function is just inside a main() nothing else.... – user2419621 Sep 02 '14 at 14:40
  • Maybe[createConnectionPool()](http://docs.oracle.com/cd/B28359_01/appdev.111/b28390/reference014.htm#i1090287) is more appropriate ? – n0p Sep 02 '14 at 15:31