OCI 9.x example

This code sample illustrates the changes you need to make to the “OCI 8.x example” for an OCI 9.x connection. The only differences are the third arguments that you pass to the JagCmGetConnection and JagCmReleaseConnection methods. Other than these changes, the OCI 8.x example works for OCI 9.x connections.

     /* Connect to ORACLE */ 
    cache = NULL; 
    ociret = JagCmGetConnection(&cache, 
                                USERID, PASSWD, DATASOURCE, 
                                "OCI_9", 
                                (void*)&svchp, 
                                JAG_CM_FORCE); 

     /* Release connection */ 
     ret = JagCmReleaseConnection(&cache, 
                                  USERID, PASSWD, DATASOURCE, 
                                  "OCI_9", 
                                  svchp, 
                                   JAG_CM_UNUSED);