Using OCI 8.x connection caches  Using cached connections in PowerBuilder components

Chapter 26: Using Connection Management

Using OCI 9.x connection caches

Using an OCI 9.x connection cache requires the same header files and data structures, as described in “Using OCI 8.x connection caches”.


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); 




Copyright © 2005. Sybase Inc. All rights reserved. Using cached connections in PowerBuilder components

View this book as PDF