Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
sql Added support for the case when the time zone minute offset is negative Oct 28, 2017
Makefile Add support for installing ODPI-C into a user-defined prefix May 30, 2018
Makefile.win32 Rework of samples Makefile similar to the changes made for the main l… Oct 28, 2017
README.md Rework of samples Makefile similar to the changes made for the main l… Oct 28, 2017
SampleLib.c Silence warning about missing space for a trailing NULL which is not … May 30, 2018
SampleLib.h Add script sql/SampleEnv.sql and read environment variables during sa… Aug 8, 2017
TestAQ.c Add script sql/SampleEnv.sql and read environment variables during sa… Aug 8, 2017
TestAppContext.c Add script sql/SampleEnv.sql and read environment variables during sa… Aug 8, 2017
TestBFILE.c Move nullOk back to dpiQueryInfo since it is specific to queries and is Aug 11, 2017
TestBLOB.c Move nullOk back to dpiQueryInfo since it is specific to queries and is Aug 11, 2017
TestBindArrays.c Add script sql/SampleEnv.sql and read environment variables during sa… Aug 8, 2017
TestBindObjects.c Add script sql/SampleEnv.sql and read environment variables during sa… Aug 8, 2017
TestCLOB.c Move nullOk back to dpiQueryInfo since it is specific to queries and is Aug 11, 2017
TestCQN.c Bump version to 3.0 and remove deprecated functions. Jun 19, 2018
TestCallProc.c Add script sql/SampleEnv.sql and read environment variables during sa… Aug 8, 2017
TestConvertNumbers.c Add script sql/SampleEnv.sql and read environment variables during sa… Aug 8, 2017
TestDMLReturning.c Bump version to 3.0 and remove deprecated functions. Jun 19, 2018
TestDistribTrans.c Add script sql/SampleEnv.sql and read environment variables during sa… Aug 8, 2017
TestFetch.c Move nullOk back to dpiQueryInfo since it is specific to queries and is Aug 11, 2017
TestFetchDates.c Added support for the case when the time zone minute offset is negative Oct 28, 2017
TestFetchObjects.c Add support for fractional seconds precision on timestamps and interv… Aug 10, 2017
TestImplicitResults.c Add script sql/SampleEnv.sql and read environment variables during sa… Aug 8, 2017
TestInOutTempLobs.c Add script sql/SampleEnv.sql and read environment variables during sa… Aug 8, 2017
TestInsert.c Add script sql/SampleEnv.sql and read environment variables during sa… Aug 8, 2017
TestInsertAsArray.c Add script sql/SampleEnv.sql and read environment variables during sa… Aug 8, 2017
TestLongRaws.c Add script sql/SampleEnv.sql and read environment variables during sa… Aug 8, 2017
TestLongs.c Add script sql/SampleEnv.sql and read environment variables during sa… Aug 8, 2017
TestRefCursors.c Move nullOk back to dpiQueryInfo since it is specific to queries and is Aug 11, 2017

README.md

This directory contains samples for ODPI-C. All of the executables can be built using the supplied Makefile (Makefile.win32 for use with nmake on Windows). The executables will be placed in the subdirectory "build" and can be run from there.

See the top level README for the platforms and compilers that have been tested and are known to work.

Some samples require the latest Database features. TestBFILE needs to write to the physical directory that the database can read from, so it will generally fail unless it is run on the same machine as the database.

To run the samples:

  • Ensure that installation of the ODPI-C library has been completed as explained here.

  • Optionally edit the file sql/SampleEnv.sql and edit the parameters defined there. If you don't change any of the parameters, make the sure the schemas odpicdemo and odpicdemo_proxy can be dropped. If you do edit the parameters defined there, also set the corresponding environment variables indicated on the right of the defined variable.

  • Optionally set the environment variable ODPIC_SAMPLES_CONNECT_STRING to point to the database in which you plan to run the tests. If this environment variable is not set, the connect string will be assumed to be the EZ connect string "localhost/orclpdb".

  • Run 'make clean' and 'make' to build the samples

  • Run SQL*Plus as SYSDBA and create the sample SQL objects with sql/SetupSamples.sql. The syntax is:

    sqlplus / as sysdba @SetupSamples

  • Change to the 'build' directory and run each sample individually. On Linux you will need to set LD_LIBRARY_PATH to point to the location of the library, for example:

    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../../lib ./TestAppContext
    
  • After running the samples, drop the SQL objects by running the script sql/DropSamples.sql. The syntax is:

    sqlplus / as sysdba @DropSamples