Re: Using OCI for C++

From: Rob MacDonell <robm_at_netcom.com>
Date: Wed, 6 Oct 1993 07:40:39 GMT
Message-ID: <robmCEGtBs.CAK_at_netcom.com>


In article <1993Oct5.163611.13793_at_infoman.com>, Laura Roberts <infoman!laurar> wrote:
>
> If your keeping up with all the mail, it's me (Laura Roberts) again
>pleading for help with the same problems I've previously discussed :
>
>Has anyone used the OCI ORACLE Client Tools with C++?
>
>Has anyone been able to pass an ldadef from one method to another?
>Has anyone been able to get anything but a character string from ofetch?
>
>"Not I" says the cat.
>
I am doing exactly what you want. I have written a MacApp Class to access Oracle using OCI. I am accessing Oracle6 still though but as I understand the interface should still be the same.

I store the ldadef as a private member of a class. In that same class I have Logon(), Select(), Insert(), Update() ... methods that use the ldadef. Actually, cursors are created using the ldadef and most of the work is done through cursors.

Generally if you follow the OCI documentation - what little of it there is the necessary steps for executing a transaction are listed. I wrapped these steps into my classes.

You definitely should not have to log on for every statement.

It sounds like you are not using cursors correctly. Also, ofetch is tricky. You have to ensure that storage space is allocated for the data that is being retrieved. For now I use pointers to allocate the space (instead of Handles).

I also use orlon instead of olon.

Hope this helps.

-- 
-- 
Rob MacDonell      				              Aim 21, Inc.
robm_at_netcom.com						      (415) 346-3374
Received on Wed Oct 06 1993 - 08:40:39 CET

Original text of this message