Re: Packages vs PRO*C/C++

From: <dmcclory_at_my-dejanews.com>
Date: Fri, 12 Jun 1998 02:04:57 GMT
Message-ID: <6lq2c8$g1m$1_at_nnrp1.dejanews.com>


David, so far as I know, the only way to call a package from within C++ is to use Pro*C/C++. If you know the proper things to set up in your compiler environment, then it's just a simple matter of inserting a normal looking set of PL/SQL code to call the package.

You can also call C++ functions from within an Oracle package, though that's more difficult. You have to compile the C++ code into a DLL or library, then notify the database of the library, and set up a "wrapper" package to do the calls.

In article <357D466B.45BAA95E_at_tid.es>,   David Labajo <labajo_at_tid.es> wrote:
>
> Hello,
>
> I'm developing an application which connects to an Oracle database using
> PRO*C/C++. The application is written in C++ under Solaris 2.5.1. The
> application works right, but I have had a lot of problems with PRO*C.
> It's not Multithreaded safe, and it has a lot of memory leaks. I have
> finally solved all these problems, but I think there should be something
> more eficient than PRO*C.
>
> I've just read there are something called "Packages", stored in the
> server like PL/SQL, and that can be accesed from C++ programs; bu HOW?.
> How can I write a package and use it from a C++ program?. Do I have to
> connect to the database like in PRO*C?. Do I have to compile/link my
> program with special libraries?......
>
> The question is: Which is the best way to make selects, inserts,
> updates, deletes in an Oracle database from a c++ program? If PRO*C is
> the answer, Is it better to use classes made with dynamic SQL (Method 4)
> to perform all the SQL sentences (This is what I've done till now); or
> explicit SQL sentences without dynamic SQL?.
>
> Thanks in advanced for your answer
>
> David Labajo
> TID
>
> labajo_at_tid.es
>
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Fri Jun 12 1998 - 04:04:57 CEST

Original text of this message