Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle and C/C++
Hwal Song wrote in message <6urm3l$jg7_at_magus.cs.utah.edu>...
>We are developing an application with a HP server and 25 HP clients.
>We installed Oracle at the server side and installed
>SQL*Net, Tcp/IP stuff, and SQL*PLUS at the client sides.
>
>After some research, we planned to use
>Oracle ProC/C++ for developing an application.
>We will use Embedded PL/SQL.
Embedded SQL is an iffy choice when working with C++ (or any object oriented
language). Depending on your application, you may end up creating lots &
lots
of 'glue code' classes which map your database operations to object oriented
operations. Since Embedded SQL forces you to 'hard code' all your SQL
statements,
this usually means one class per table or operation, with several methods
for
insert, update, delete and select.
If you want to get any re-use out of your interface, you're much better
going with
the Oracle Call Interface (OCI - similar to Sybase's DBLib/CTLib), or even
better,
a nice class library like RogueWave's library.
Also embedded SQL makes it more difficult to write a centralized error
handling
routine - you usually end up copying logic after each statement.
You can get around many of these hurdles by using dynamic SQL with Pro*C,
but
then you might as well be using OCI.
Good luck,
-Stephen Broberg
smb_at_mediaone.net
Received on Fri Sep 25 1998 - 00:00:00 CDT
![]() |
![]() |