Oracle with C++

Started by
7 comments, last by achacha 18 years, 3 months ago
This is a quick question. At work we are moving over from PROC to using C# + the .NET interfaces that .NET provides. Now I'm a bit of a C++ fan so would like to know if there is a pre-comilper availavble (ANSII) for c++ and Oracle complatibility...am sure Oracle provide one but have never heard of one. Any ideas?
Gary.Goodbye, and thanks for all the fish.
Advertisement
Quote:Original post by garyfletcher
This is a quick question.

At work we are moving over from PROC to using C# + the .NET interfaces that .NET provides.

Now I'm a bit of a C++ fan so would like to know if there is a pre-comilper availavble (ANSII) for c++ and Oracle complatibility...am sure Oracle provide one but have never heard of one.

Any ideas?


The great thing about .NET is that you can program it using any language you would like since all code is compiled into MSIL. This allows libraries and programs to easily communicate with each other no matter the langugae used. If you prefer C++, you can take advantage of Managed C++ and the .NET Framework.

As far as interfacing with Oracle (I'm assuming your talking about .NET), you will want to look into ADO .NET. This is the common .NET library for interfacing with database systems.

Bill
Thanks Bill

But was acutall asking if there was a PURE C++ pre-comiler that could be used with Oracle. I know that .NET ado exists, in fact know about .NET ASP, .NET C#, .NET VB etc etc. and their really excellent (humour) unmanaged ado, vb, VC++ parent(s) with Oracle.

I take it you've never used C with Oracle? Just asking...or only ever used micrsoft products? Why not just advocate using Java and all the Java+Oracle products thats are supported??????

I really was just asking about asking about C++ and Oracle for home stuff. But thanks for your reply...sorry if I was a bit short with you.

Anyone know?
Gary.Goodbye, and thanks for all the fish.
Do yourself a favor and just use C# to interface with the database. You will save LOTS of time and headache, then even touching the C++ stuff.
FTA, my 2D futuristic action MMORPG
If you want to access databases from C/C++, you want to look into ODBC. It works, and it's cross platform, but it is rather tedious due to all the memory management issues. You'd probably be best served by writing some wrapper classes around it.

MSDN is probably the best source of documentation on it, as ODBC was originally created by Microsoft.
Thanks for all the suggestions guys.

Was just looking for a pre-comiler for C++ intergration with Oracle. Already have a C pre-comiler (PRO*C) and oci, know all about ODBC, know all about the .NET interoptrativity.

Can someone help or does it just not exist. It is looking that way.
Gary.Goodbye, and thanks for all the fish.
I'm not sure what you mean by "pre compiler", but if you google "C++ Oracle API" i'm sure you will find what you are looking for. This is the first thing that turns up for me, and it looks pretty solid.

But seriously, are you really planning on calling C++ code from inside C# just to interface with a database? If so, I hope you realize it is like 5 lines of already written code in C# to access the database, while in C++ you will have to write probably more then 20x that, just to make the wrapper.
FTA, my 2D futuristic action MMORPG
There is an OCI wrapper for download on the Oracle pages. ODAC / ODP.NET ( Oracle Data Access Components / Oracle Data Provider for .NET ) is a .NET library. Do yourself a favor and use it with C#. Anything else is just a huge catastrophe waiting to happen.

If you are moving to C#, use C#. Trying to use Managed C++ with any kind of legacy OCI ( or OCCI ) interface is just too much work compared to the ease of use that ODAC / ODP.NET provides.
I use Oracle OCI in my C++ code and it works great, faster than ODBC and ADO. Takes a bit of time to go through it but if you look at the samples you can easily adapt it to your project.
++Alex

This topic is closed to new replies.

Advertisement