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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle C++ wrapper class

Re: Oracle C++ wrapper class

From: Mike Krolewski <mkrolewski_at_rii.com>
Date: Tue, 26 Dec 2000 18:01:09 GMT
Message-ID: <92amd2$m41$1@nnrp1.deja.com>

In article <AIv16.5784$3B5.151328_at_newsread2.prod.itd.earthlink.net>,   "Doug Farrell" <dfarrell01_at_earthlink.net> wrote:
> Hi all,
>
> Anyone know of or have a C++ class(es) for wrapping up access to
 Oracle
> databases on Sun systems? I'm really tired of using PL/SQL and it's
 wacky
> syntax every time I want to access a table in our databases for web
> development. What I'm looking for is something like what JDBC does,
 where
> you can send an SQL query to the Oracle database and it sends back a
> recordset. Then I can 'index' into the recordset by column name to
 retrieve
> the data. Anyone know of anything like this or have an idea where I
 can look
> to write my own?
>
> Thanks in advance,
> Doug Farrell
>
>

Simple answer is no. ProC/OCI both use the cursor methodology as does PL/SQL. IMHO cursors are more useful than a recordset. They provide more control over speed and amount of data retrieved and error messages. They also allow for more reaction to errors in any given row of data.

I envision the cursor much like openning a file and reading the contents either a record or a block at a time. I have written my own functions to convert the fetched data into some sort of structure (s)/class(es). I found that if I cannot use the fetched data as is, I really need a very different structure than the one the would be provided by a recordset.

There is a OCI wrapper class for converting cursors into a stream, basically taking my file analogy further.

           http://www.geocities.com/skuchin/otl/home.htm

I have used this set in the past. It was much better than OCI.

--
Michael Krolewski
Rosetta Inpharmatics
mkrolewski_at_rii.com
              Usual disclaimers


Sent via Deja.com
http://www.deja.com/
Received on Tue Dec 26 2000 - 12:01:09 CST

Original text of this message

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