Home » Developer & Programmer » Precompilers, OCI & OCCI » Simple Database connection failed
Simple Database connection failed [message #187167] Fri, 11 August 2006 03:37 Go to next message
Messages: 2
Registered: August 2006
Junior Member

I have a problem with creating a connection to a Oracle 10g Database. I have a C++ program an work with the Microsoft Visual C++ 6.0. My problem refers to the following code:

#include "stdafx.h"
#include <stdio.h>
#include <iostream.h>
#include <occi.h>
using namespace std;
using namespace oracle::occi;

void main(void)
        cout<<endl<< "Program started"<<endl<<endl;
        const string user = "Scott";
	const string password = "Tiger";
	const string database = "testdb";

	    Environment *env = Environment::createEnvironment();
		Connection *conn = env->createConnection(user,password,database);
		cout<<"Yeeehha i have a connection";

	catch (exception &excp)

Actually I want to make first times only one connection to the data base, which normally no problem should be. But every time I want to run the program come the following Error:

ORA-24960: the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255

Does someone have an idea which cause of these errors to have could?
For suggestions I would be very grateful.

P.S. sorry for the bad English, but i’am German 

Mfg gunnar
Re: Simple Database connection failed [message #187230 is a reply to message #187167] Fri, 11 August 2006 07:17 Go to previous message
Messages: 2
Registered: August 2006
Junior Member

I solved the problem!! I have used the wrong Instandclient Embarassed ! Thus vc70 instead of vc60! Now everything functions: -) Cool !
Previous Topic: spatial object retrieval using OCI
Next Topic: Need 10g - ( ) version Pro*C/C++ Precompiler
Goto Forum:

Current Time: Mon Aug 21 03:35:36 CDT 2017

Total time taken to generate the page: 0.09290 seconds