Re: OCI help needed

From: Anthony Pontier <apontier_at_hotmail.com>
Date: Wed, 31 Oct 2001 16:11:30 -0600
Message-ID: <FD_D7.55503$6i7.7690903_at_e420r-atl1.usenetserver.com>


Check out this site, it may save you some headaches.

Tony

"Mike" <mike_at_nospam.com> wrote in message news:b2VA7.8074$Fx6.3621978_at_typhoon.columbus.rr.com...
> I have to connect to oracle database through OCI (I am using C). I have an
> IP and port. The problem for me is how do I let OCI handles know what file
> descriptor to use?
>
> ocifd = openSocket(ipAddress, portNumber) //*--- open port & return file
> descriptor
>
> wher do I specify ocifd in OCI calls?
>
> if (OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &errhp, OCI_HTYPE_ERROR,
> (size_t) 0, (dvoid **) 0)) {
> exit (-1);
> }
>
> if (OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &srvhp,
OCI_HTYPE_SERVER,
> (size_t) 0, (dvoid **) 0)) {
> exit (-1);
> }
>
> if (OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &svchp,
OCI_HTYPE_SVCCTX,
> (size_t) 0, (dvoid **) 0)) {
> exit (-1);
> }
>
> /* set attribute server context in the service context */
> if (OCIAttrSet( (dvoid *) svchp, OCI_HTYPE_SVCCTX, (dvoid *)srvhp,
> (ub4) 0, OCI_ATTR_SERVER, (OCIError *) errhp)) {
> exit(-1);
> }
>
> if (OCIHandleAlloc((dvoid *) envhp, (dvoid **)&authp,
> (ub4) OCI_HTYPE_SESSION, (size_t) 0, (dvoid **) 0)) {
> Trace(ERROR_LEVEL, "OCI_ERROR: OCIHandleAlloc failed.");
> exit (-1);
> }
>
> etc......
>
> Appreciate your help.
> Mike
>
>
Received on Wed Oct 31 2001 - 23:11:30 CET

Original text of this message