Re: Packages vs PRO*C/C++
Date: Thu, 11 Jun 1998 09:26:07 +0100
Message-ID: <897553482.3767.0.nnrp-01.c2de712e_at_news.demon.co.uk>
Seems to me you need to read the Oracle manuals. All the information you need is there, in the Pro*C/C++ and PL/SQL manuals. Maybe you should also look at the Oracle Concepts manual and the Application Developer's manual. Also try some Oracle training and maybe get some outside consultancy.
As regards approach, I try to exploit the strengths of both languages: Anything that is compute and I/O light I tend to write as stored procedures placed in packages, anything compute intensive and/or complex and/or I/O formatting heavy and/or low-level at the OS level I tend to write in C/C++. Obviously every application is different, so you'll have to do some testing to assess the performace and coding implications of alternative approaches.
My goal these days is to put as much database interaction as I can in stored procedures, and use a tool like SQL Navigator Pro to develop it. I try to remove as much SQL from my 3GL code as possible. You can call stored code (functions, procedures and packaged versions of them from Pro C/C++), and you can also do array fetches for SELECT statements from stored procedures. Again, check the manuals and the examples in the 'proc' installation directory on your server.
Steve P.
David Labajo wrote in message <357D466B.45BAA95E_at_tid.es>...
>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
>
Received on Thu Jun 11 1998 - 10:26:07 CEST