OCI help needed
From: Mike <mike_at_nospam.com>
Date: Mon, 22 Oct 2001 13:20:07 GMT
Message-ID: <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?
}
}
}
}
}
Date: Mon, 22 Oct 2001 13:20:07 GMT
Message-ID: <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);
}
[Quoted] etc......
Appreciate your help.
Mike
Received on Mon Oct 22 2001 - 15:20:07 CEST
