Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Oracle Programming on HPUX

Re: Oracle Programming on HPUX

From: Scott McKellar <mck9_at_swbell.net>
Date: 2000/06/07
Message-ID: <393EFD58.32DF3EE5@swbell.net>#1/1

Don Chambers wrote:
>
> Any suggestions for how to go about developing an Oracle application
> on UNIX?
> I have been brought into a project that is falling behind schedule and
> will have the opportunity to redesign some portions of it. This will
> be my first UNIX/Oracle programming project. I have written UNIX
> applications in the past and have lots of experience writing Visual
> C++ Oracle apps (using CDatabase) but this is the first time I will
> use Oracle from UNIX
> .
> The current team is using Rouge Wave to access Oralce but cannot get
> it to work in the UNIX environment (it will work on NT). RougeWave's
> tech support seems terrible and we always have to wait for days for an
> answer.
> I have been looking at Pro*C but it seems to be a real pain. You have
> to run it through a precompiler and then use generated code which
> makes it difficult to set break points.

[snip]

> Thanks,
> Don
> chambers_at_inquiregroup.com

I never used Rogue Wave myself, but we're using a vendor product which was developed using Rogue Wave, Oracle, and C++ under HP-UX 10.20. So it can be done, but I can't tell you how.

The Pro*C precompiler is indeed a bit of a nuisance. I try to contain the damage by confining my use of SQL to smallish modules that mostly just serve as wrappers for database calls. The rest of the application I write in ordinary C, so far as possible.

PL/SQL is another good approach for logic which is database-intensive. You can code a series of database calls more quickly in PL/SQL more quickly than you can code the equivalent C code, because you're not always jumping in and out of Oracle and having to wrestling with the call interface. Package the lot in a stored procedure and then call it from C or C++. For what it's worth you can call the same stored procedure from other languages such as COBOL. In a mixed-language environment such as ours, that kind of reusability comes in handy.

Another option is to use the Oracle Call Interface (OCI). To a first approximation, with OCI you do manually what the precompiler does automatically, calling Oracle functions directly (though the underlying API is different). OCI is probably better than Pro*C for optimizing performance, if you know what you're doing, but it's not the best way to get a product out the door in a hurry.

Scott McKellar mck9_at_swbell.net Received on Wed Jun 07 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US