Jump to content
  • Advertisement
Sign in to follow this  
garyfletcher

Oracle with C++

This topic is 4678 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!