Re: OTL database access class

From: Doug Farrell <dfarrell01_at_earthlink.net>
Date: Wed, 27 Dec 2000 23:04:27 GMT
Message-ID: <%zu26.29688$RC1.1030745_at_newsread1.prod.itd.earthlink.net>


Mike,

Thanks for your feedback, I will think about it seriously. If you can, could you send an example of one of the classes you developed as an example?

I don't really see what you're saying about how I'd have to create and bind variables in my code just like I do with PL/SQL. It seems very awkward to go in and out of EXEC statments and move char buffers around to make them accessible to the rest of my program. I guess what I'm really looking for is [Quoted] a generic way to access an Oracle database through C++ so I don't have to right a new class for every query I want to process. I would much prefer to just query the database and then iterate through a results structure, if you know what I mean. Then the users of the database (the other programmers on my team) could just use that generic class when they building dynamic HTML.

Thanks again,
Doug

"Mike Krolewski" <mkrolewski_at_rii.com> wrote in message news:92ddob$mde$1_at_nnrp1.deja.com...
> In article <LLo26.27256$RC1.933699_at_newsread1.prod.itd.earthlink.net>,
> "Doug Farrell" <dfarrell01_at_earthlink.net> wrote:
> > Hi,
> > I'm new to Oracle but have written some PL/SQL that is part of a C++
 class.
> > To say the least I find this to be a poor solution to getting data
 from our
> > Oracle database. Does anyone have any experience with OTL database
 library?
> > URL : http://www.geocities.com/skuchin/otl/home.htm
> >
> > I've looked at it and it looks pretty good, but I was wondering if
 anyone
> > who has used it would care to comment on their experiences.
> >
> > Thanks in advance,
> > Doug
> >
> >
>
> I used it for about 2 years. The OTL is a major improvement over OCI.
> OCI has too many cryptic parameters.
>
> I do not think you will find it any easier than PL/SQL. You have the
> same problems with binding and collecting data from any statement. IMHO
> proC is more obvious. I like using the method 4 as it gives me the most
> control over activities. You still need to construct the binding
> structures, and indicator variables. I have built up a template for
> doing any fetch -- replacing the cursor name (need new one for each
> cursor ), filling in the actual query, and updating the cursor
> structure, and of course the fetch area. I generally build this like a
> file operation with an open, fetch and close procedure. Within the
> fetch, I typically translate the data into a more reasonable C/C++
> object or structure.
>
> After the procedures are written, I can focus on the real reason for
> writing the C++ program. Again, I would like to think that one should
> use PL/SQL if all you are doing is within the database. The PL/SQL is
> more reliable and rapid then translating into another language.
>
> --
> Michael Krolewski
> Rosetta Inpharmatics
> mkrolewski_at_rii.com
> Usual disclaimers
>
>
> Sent via Deja.com
> http://www.deja.com/
>
Received on Thu Dec 28 2000 - 00:04:27 CET

Original text of this message