Recent News

OCILIB SVN repository has been updated (2009-06-23)

Posted by Vincent Rogier on June 23rd, 2009

The current development snapshot of v3.3.0 has been updated.

You can browse the repository on sourceforge here
The temporary v3.3.0 changelog is available here

This latest update includes some bug fixes

Have a nice day !

OCILIB SVN repository has been updated (2009-06-10)

Posted by Vincent Rogier on June 11th, 2009

The current development snapshot of v3.3.0 has been updated.

You can browse the repository on sourceforge here
The temporary v3.3.0 changelog is available here

Main modification of the current development version 3.3.0 :

  • Added SQL command and verb retrieving
  • Added support for batched errors for Array DML
  • Extended Lob Support
  • Extended Collection API
  • Modified and extended Bind API
  • Miscellaneous changes
  • Miscellaneous fixes

This version should be released soon…

Have a nice day and nice week end

OCILIB v3.2.0 now available for download !

Posted by Vincent Rogier on April 20th, 2009

OCILIB v3.2.0 is now available for download ! Here is the list of the main changes :

  • support for direct path loading
  • extended binding capabilities (rebinding, update of array size, …)
  • extended objects API
  • modified Database objects describe API
  • static libraries builds for GCC ports on MS Windows added
  • documentation updated
  • Miscellaneous internal modifications
  • Miscelleanous fixes (see changelog)
  • Miscelleanous modifications (see changelog)

See the complete v3.2.0 change log here

Get the release and enjoy it !

Have a nice week.

OCILIB SVN repository has been updated (2009-04-10)

Posted by Vincent Rogier on April 10th, 2009

The current development snapshot of v3.20 has been updated.

You can browse the repository on sourceforge here
The temporary v3.2.0 changelog is available here

Main modification of the current development version 3.2.0 :

  • Added support for Direct Path Loading
  • Modified Database objects describe API
  • Extended binding possibilities
  • Extented Object API
  • Fixed OCI_Element API
  • Extended UROWID support
  • Miscellaneous changes
  • Miscellaneous fixes
  • Documentation updates

This version should be released soon…

Have a nice day and nice week end

OCILIB 3.2.0 available soon !

Posted by Vincent Rogier on March 17th, 2009

OCILIB 3.2.0 will be available soon (beginning of April 09)… This release :

  • adds support for direct path interface
  • extends binding capabilities (rebinding, update of array size, …)
  • extends objects API
  • adds Miscellaneous changes and fixes

Here is an example of an full program that loads data into a table with direct path loading.
It shows some possibilities of the direct path implementation :

#include "ocilib.h"
 
#define SIZE_TAB  1000
#define SIZE_COL1 5
#define SIZE_COL2 10
#define SIZE_COL3 6
#define NUM_COLS  3
 
int main(void)
{
    OCI_Connection *cn;
    OCI_DirPath    *dp;
 
    char arrval1[SIZE_TAB][SIZE_COL1+1];
    char arrval2[SIZE_TAB][SIZE_COL2+1];
    char arrval3[SIZE_TAB][SIZE_COL3+1];
 
    int arrsize1[SIZE_TAB];
    int arrsize2[SIZE_TAB];
    int arrsize3[SIZE_TAB];
 
    int i;
 
    if (!OCI_Initialize(NULL, NULL, OCI_ENV_DEFAULT))
        return EXIT_FAILURE;
 
    cn = OCI_ConnectionCreate("db", "usr", "pwd", OCI_SESSION_DEFAULT);
    dp = OCI_DirPathCreate(cn, "usr", "test_dp", NULL, NUM_COLS, SIZE_TAB);
 
    /* optionnal attributes to set */
 
    OCI_DirPathSetBufferSize(dp, 128000);
    OCI_DirPathEnableCache(dp, TRUE);
    OCI_DirPathSetCacheSize(dp, 1000);
    OCI_DirPathSetNoLog(dp, TRUE);
    OCI_DirPathSetParallel(dp, TRUE);
 
    /* describe the target table */
 
    OCI_DirPathSetColumn(dp, 1, "VAL1", SIZE_COL1, NULL    , 0, 0, FALSE);
    OCI_DirPathSetColumn(dp, 2, "VAL2", SIZE_COL2, NULL    , 0, 0, FALSE);
    OCI_DirPathSetColumn(dp, 3, "VAL3", SIZE_COL3, "DDMMYY", 0, 0, FALSE);
 
    OCI_DirPathPrepare(dp);
 
    /******* method 1 : set each array entry  ******/
 
    for (i = 0; i < SIZE_TAB; i++)
    {
        /* fill test values */
 
        sprintf(arrval1[i], "%d", i);
        sprintf(arrval2[i], "val %05d", i);
        sprintf(arrval3[i], "130309");
 
        OCI_DirPathSetEntry(dp, i, 1, arrval1[i], -1, TRUE);
        OCI_DirPathSetEntry(dp, i, 2, arrval2[i], (int) strlen(arrval2[i]), TRUE);
        OCI_DirPathSetEntry(dp, i, 3, arrval3[i], (int) SIZE_COL3, TRUE);
    }
 
    /* load data to the server */
 
    OCI_DirPathConvert(dp);
    OCI_DirPathLoad(dp);
 
    /* reset path stream */
 
    OCI_DirPathReset(dp);
 
    /****** method 2 : pass arrays in one call ******/
 
    for (i = 0; i < SIZE_TAB; i++)
    {
       /* fill test values */
 
        sprintf(arrval1[i], "%d", i);
        sprintf(arrval2[i], "val %05d", i);
        sprintf(arrval3[i], "130309");
 
        /* setup sizes */
 
        arrsize1[i] = -1;
        arrsize2[i] = (int) strlen(arrval2[i]);
        arrsize3[i] = SIZE_COL3;
 
    }
 
    OCI_DirPathSetArray(dp, 1, arrval1, arrsize1);
    OCI_DirPathSetArray(dp, 2, arrval2, arrsize2);
    OCI_DirPathSetArray(dp, 3, arrval3, arrsize3);
 
    /* load data to the server */
 
    OCI_DirPathConvert(dp);
    OCI_DirPathLoad(dp);
 
    /* commit data */
 
    OCI_DirPathFinish(dp);
 
    /* free direct path object */
 
    OCI_DirPathFree(dp);
 
    OCI_Cleanup();
}

Recent Comments | Recent Posts

Copyright © OCILIB | OCILIB Logo designed by WolfHound (Developpez.com)
Theme based on Wordpress AngelicDesign by: Website Builder
bottom