BryanMColeman 0 Newbie Poster

I am rewriting in Visual Studio 2008 c++ an application written in VB.NET that successfully connects to an oracle 10g database using OracleDataAccessClient.dll. I am trying to utilize the same dll in the c++ app though very unsuccessfully.

In the project's Property Pages, I have successfully referenced the dll. In the file containing the code that is trying to access the oracle database i have placed the following using statement at the top of the file:

using namespace Oracle.DataAccess.Client;

In the app code itself the following code:

OracleConnection* myConnection = new OracleConnection(sMyConnectionString);

generates the following errors:
error C2065: 'OracleConnection': undeclared identifier
error C2065: 'myConnection': undeclared identifier
error C2061: syntax error: identifier 'OracleConnection'

If i fully qualify OracleConnection as in:

Oracle::DataAccess::Client::OracleConnection* myConnection = new Oracle::DataAccess::Client::OracleConnection(sMyConnectionString);

the following errors are generated:
error C3699: '*' cannot use this indirection on type 'Oracle:: DataAccess::Client::OracleConnection'
error C3624: 'System::Component::Model::Component': use of this type requires a reference to assembly 'System'
error C2750: 'Oracle:: DataAccess::Client::OracleConnection': cannot use 'new' on the reference type; use 'gcnew' instead
error C2664: 'Oracle:: DataAccess::Client::OracleConnection::OracleConnection(System:: String^)': cannot convert parameter 1 from char * to System:: String^'

I then tried using gcnew rather than new which removed the third error, but the other three still remained.

Visual Studio's intellisense recognizes the "Oracle::" (it displayed "{} DataAccess" for me to select), so it appears that the project reference to the dll is working (when i remove the reference, the intellisense functionality does not display the {} DataAccess after i type in "Oracle::").

I am an old C developer and am not comfortable with OOP but i am trying my best. c++ in Visual Studio has an awful lot to offer, but trying to connect to oracle with it has me beaten. Any help resolving this problem would be really appreciated.

thanks.
bryan