#include "ocilib_demo.h"
void print_version(void);
void cleanup(void);
void disconnect(void);
void create_tables(void);
void drop_tables(void);
void test_format(void);
void test_immediate(void);
void test_immediate_format(void);
void test_fetch(void);
void test_bind1(void);
void test_bind2(void);
void test_piecewise_insert(void);
void test_piecewise_fetch(void);
void test_lob(void);
void test_nested_table(void);
void test_ref_cursor(void);
void test_plsql(void);
void test_dates(void);
void test_timestamp(void);
void test_describe(void);
void test_returning(void);
void test_returning_array(void);
void test_object_insert(void);
void test_object_fetch(void);
void test_object_fetch_string(void);
void test_scrollable_cursor(void);
void test_collection(void);
void test_ref(void);
void test_directpath(void);
void test_bigint(void);
void test_number(void);
test_t tab_test[] =
{
{test_format, TRUE},
{test_immediate, TRUE},
{test_immediate_format, TRUE},
{test_fetch, TRUE},
{test_bind1, TRUE},
{test_bind2, TRUE},
{test_piecewise_insert, TRUE},
{test_piecewise_fetch, TRUE},
{test_lob, TRUE},
{test_nested_table, TRUE},
{test_ref_cursor, TRUE},
{test_plsql, TRUE},
{test_dates, TRUE},
{test_timestamp, TRUE},
{test_describe, TRUE},
{test_returning, TRUE},
{test_returning_array, TRUE},
{test_object_insert, TRUE},
{test_object_fetch, TRUE},
{test_object_fetch_string, TRUE},
{test_scrollable_cursor, TRUE},
{test_collection, TRUE},
{test_ref, TRUE},
{test_directpath, TRUE},
{test_bigint, TRUE},
{test_number, TRUE}
};
static otext str[SIZE_STR+1];
static otext temp[SIZE_STR+1];
static int nb_err = 0;
static int nb_warn = 0;
{
print_text("\n");
if (err_type == OCI_ERR_WARNING)
{
print_text("> WARNING : ");
nb_warn++;
}
else
{
print_text("> ERROR : ");
nb_err++;
}
print_text("\n");
}
int omain(int argc, oarg* argv[])
{
otext home[SIZE_STR+1] = OTEXT("");
otext dbs [SIZE_STR+1] = OTEXT("");
otext usr [SIZE_STR+1] = OTEXT("");
otext pwd [SIZE_STR+1] = OTEXT("");
size_t i;
if (argc < (ARG_COUNT-1))
{
return EXIT_FAILURE;
}
GET_ARG(dbs, ARG_DB);
GET_ARG(usr, ARG_USER);
GET_ARG(pwd, ARG_PWD);
if(argc == ARG_COUNT)
GET_ARG(home, ARG_HOME);
if (!
OCI_Initialize(err_handler, home, OCI_ENV_DEFAULT | OCI_ENV_THREADED))
return EXIT_FAILURE;
print_text("Connecting to ");
print_ostr(usr);
print_text("/");
print_ostr(pwd);
print_text("@");
print_ostr(dbs);
print_text("\n\n");
if (cn)
{
print_version();
create_tables();
for (i = 0; i < ARRAY_COUNT(tab_test); i++)
{
if (tab_test[i].execute)
tab_test[i].proc();
}
drop_tables();
disconnect();
}
else
{
}
cleanup();
print_text("\npress any key to exit...");
return getchar() != 0;
}
void cleanup(void)
{
print_frmt("\n%i errors \n", nb_err);
print_frmt("\n%i warnings \n\n", nb_warn);
}
void disconnect(void)
{
}
void print_version(void)
{
print_text("\n>>>>> OCILIB BUILD INFORMATION \n\n");
print_text("OCI import mode : LINKAGE\n");
else
print_text("OCI import mode : RUNTIME\n");
print_text("char type : ANSI\n");
else
print_text("char type : WIDE\n");
print_text("\n>>>>> VERSIONS INFORMATION \n\n");
print_frmt("OCILIB major version : %i\n", OCILIB_MAJOR_VERSION);
print_frmt("OCILIB minor version : %i\n", OCILIB_MINOR_VERSION);
print_frmt("OCILIB revision version : %i\n\n", OCILIB_REVISION_VERSION);
print_text("\n>>>>> SERVER VERSION BANNER \n\n");
print_text("\n\n");
}
void create_tables(void)
{
print_text("\n>>>>> CREATE TABLES FOR DEMO \n\n");
OCI_ExecuteStmt(st, OTEXT(
"create type type_t as OBJECT (id int, name varchar2(50))"));
OTEXT("( ")
OTEXT(" val_int number, ")
OTEXT(" val_flt float, ")
OTEXT(" val_dbl float, ")
OTEXT(" val_str varchar2(30), ")
OTEXT(" val_date date, ")
OTEXT(" val_lob clob, ")
OTEXT(" val_file bfile, ")
OTEXT(" val_obj type_t, ")
OTEXT(" val_raw raw(10) ")
OTEXT(")"));
OCI_ExecuteStmt(st, OTEXT(
"create type t_tab1_emp as VARRAY(100) of varchar2(50)"));
OCI_ExecuteStmt(st, OTEXT(
"create type t_tab2_emp as table of varchar2(50)"));
OTEXT("varchar2(30), price float, creation date)"));
OCI_ExecuteStmt(st, OTEXT(
"create table test_long_raw(code int, content long raw)"));
OCI_ExecuteStmt(st, OTEXT(
"create table test_long_str(code int, content long)"));
OCI_ExecuteStmt(st, OTEXT(
"create table test_lob(code int, content clob)"));
OTEXT("( ")
OTEXT(" val_int number, ")
OTEXT(" val_dbl float, ")
OTEXT(" val_flt float, ")
OTEXT(" val_str varchar2(30), ")
OTEXT(" val_date date, ")
OTEXT(" val_lob clob, ")
OTEXT(" val_file bfile ")
OTEXT(")")
);
OTEXT("( ")
OTEXT(" departement number, ")
OTEXT(" employees t_tab1_emp ")
OTEXT(")")
);
OTEXT("( ")
OTEXT(" departement number, ")
OTEXT(" employees t_tab2_emp ")
OTEXT(") nested table employees store as test_table_emp")
);
OCI_ExecuteStmt(st, OTEXT(
"create table test_directpath(val_int number(8,4), ")
OTEXT(" val_str varchar2(30), val_date date)"));
OCI_ExecuteStmt(st, OTEXT(
"create type test_num_coll_t as varray(10) of number"));
OCI_ExecuteStmt(st, OTEXT(
"create type test_num_t as object (value number)"));
OTEXT("(code, article, price, creation) ")
OTEXT("values (1, 'shoes', 3.14, to_date('1978-12-23', 'YYYY-MM-DD'))"));
OTEXT("(code, article, price, creation) ")
OTEXT("values (2, 'shirt', 5.99, to_date('1999-09-12', 'YYYY-MM-DD'))"));
OTEXT("values (1, EMPTY_CLOB())"));
OTEXT("values (1, 'Rugby rocks !')"));
OCI_ExecuteStmt(st, OTEXT(
"insert into test_coll_varray(departement,employees) ")
OTEXT("values (1, t_tab1_emp('Peter', 'John', 'Paula', 'Gina'))"));
OCI_ExecuteStmt(st, OTEXT(
"insert into test_coll_varray(departement,employees) ")
OTEXT("values (2, t_tab1_emp('Ben', 'Alice', 'Joel', 'Maria'))"));
OCI_ExecuteStmt(st, OTEXT(
"insert into test_coll_nested(departement,employees) ")
OTEXT("values (1, t_tab2_emp('Vince', 'Richard', 'Rita', 'Sophia'))"));
OCI_ExecuteStmt(st, OTEXT(
"insert into test_coll_nested(departement,employees) ")
OTEXT("values (2, t_tab2_emp('Paul', 'Sarah', 'Robert', 'Zoe'))"));
OCI_ExecuteStmt(st, OTEXT(
"insert into test_table_obj values(type_t(1, 'shoes'))"));
OCI_ExecuteStmt(st, OTEXT(
"insert into test_table_obj values(type_t(2, 'pen'))"));
}
void drop_tables(void)
{
print_text("\n>>>>> DROPPING TABLES AND TYPES \n\n");
}
void test_format(void)
{
int code = 1;
print_text("\n>>>>> TEST FORMATTING \n\n");
{
print_text("\n");
}
}
void test_immediate(void)
{
int code = 1;
print_text("\n>>>>> TEST IMMEDIATE \n\n");
OCI_Immediate(cn, OTEXT(
"select code, article from test_fetch where code = 1"),
OCI_ARG_INT, &code,
OCI_ARG_TEXT, temp);
print_frmt("> code : %i ", code);
print_text("- article : "); print_ostr(temp);
print_text("\n");
}
void test_immediate_format(void)
{
int code = 1;
print_text("\n>>>>> TEST IMMEDIATE FORMATTED\n\n");
code, OCI_ARG_TEXT, temp);
print_text("> article : "); print_ostr(temp); print_text("\n");
}
void test_fetch(void)
{
int i, n;
print_text("\n>>>>> SIMPLE TEST FETCH WITH META DATA\n\n");
for(i = 1; i <= n; i++)
{
print_frmt("> Field : #%i ", i);
print_text("\n");
}
print_text("\n");
{
print_text("\n");
}
}
void test_bind1(void)
{
int code = 1;
print_text("\n>>>>> TEST BINDING \n\n");
OCI_Prepare(st, OTEXT(
"select * from test_fetch where code = :code"));
{
print_text("\n");
}
}
void test_bind2(void)
{
int i;
double dbl;
float flt;
print_text("\n>>>>> SINGLE BINDING \n\n");
OTEXT("( ")
OTEXT(" val_int, val_dbl, val_flt, val_str, val_date, ")
OTEXT(" val_lob, val_file ")
OTEXT(") " )
OTEXT("values ")
OTEXT("( ")
OTEXT(" :val_int, :val_dbl, :val_flt, :val_str, :val_date, ")
OTEXT(" :val_lob, :val_file ")
OTEXT(") "));
osprintf(temp, SIZE_STR+1, OTEXT("lob value00"));
i = 1;
dbl = 3.14;
flt = (float) 3.14;
osprintf(temp, SIZE_STR+1, OTEXT("Name00"));
}
void test_piecewise_insert(void)
{
FILE *f;
print_text("\n>>>>> TEST PIECEWISE INSERTING\n\n");
f = fopen(OCI_SHARED_LIB, "rb");
if (f)
{
int n;
unsigned char buffer[SIZE_BUF];
fseek (f , 0 , SEEK_END);
n = ftell(f);
rewind (f);
print_frmt("\n%d bytes to write\n", n);
OCI_Prepare(st, OTEXT(
"insert into test_long_raw(code, content) ")
OTEXT("values (1, :data)"));
while ((n = (int) fread(buffer, 1, sizeof(buffer), f)))
{
}
fclose(f);
}
}
void test_piecewise_fetch(void)
{
unsigned char buffer[SIZE_BUF];
int n;
print_text("\n>>>>> TEST PIECEWISE FETCHING\n\n");
OTEXT("where code = 1"));
{
}
print_text("\n>>>>> TEST LONG MAPPED TO STRING\n\n");
OTEXT("where code = 1"));
{
print_ostr(long_str);
print_frmt("\n%d bytes read\n", (int) ostrlen(long_str));
}
}
void test_lob(void)
{
print_text("\n>>>>> TEST LOB MANIPULATION\n\n");
OTEXT("where code=1 for update"));
{
print_text(", content : "); print_ostr(temp);
print_text("\n");
}
}
void test_nested_table(void)
{
print_text("\n>>>>> TEST NESTED TABLE \n\n");
OTEXT("from dual) from test_fetch"));
{
{
print_text("\n");
}
}
}
void test_ref_cursor(void)
{
print_text("\n>>>>> TEST REF CURSOR \n\n");
OCI_Prepare(st, OTEXT(
"begin open :c for select * from test_fetch; end;"));
{
print_text("\n");
}
}
void test_plsql(void)
{
int res = 0;
const otext *p=NULL;
print_text("\n>>>>> TEST PL/SQL OUTPUT BIND\n\n");
OCI_Prepare(st, OTEXT(
"begin :res := trunc(sysdate+1)-trunc(sysdate-1); end;"));
print_text("\nPL/SQL : trunc(sysdate+1)-trunc(sysdate-1)\n");
print_frmt("\nResult : %i\n", res);
#ifndef OCI_CHARSET_ANSI
{
if (version < OCI_9_0)
return;
}
#endif
print_text("\n>>>>> TEST PL/SQL SERVER OUTPUT\n\n");
OTEXT(" dbms_output.put_line('First line'); ")
OTEXT(" dbms_output.put_line('Second line'); ")
OTEXT(" dbms_output.put_line('Third line'); ")
OTEXT("end;")
);
{
print_ostr(p);
print_text("\n");
}
}
void test_dates(void)
{
print_text("\n>>>>> TEST DATETIME MANIPULATION\n\n");
OCI_DateFromText(date, OTEXT(
"1978-04-13 20:20:12"), OTEXT(
"YYYY-MM-DD HH24:MI:SS"));
print_text("\nDate : "); print_ostr(str);
print_text("\nSysdate : "); print_ostr(str);
print_text("\nDate + 5 days + 2 months : "); print_ostr(str);
print_text("\nLast day of the month : "); print_ostr(str);
print_frmt("\nEnd of the month - date : %i days",
print_text("\n");
}
void test_timestamp(void)
{
#ifndef OCI_CHARSET_ANSI
if ((version >= OCI_9_0) || (version < OCI_10_1))
return;
#endif
{
print_text("\n>>>>> TEST TIMESTAMP\n\n");
print_text("Current timestamp : "); print_ostr(str);
{
print_text("\n>>>>> TEST INTERVAL \n\n");
print_text("Interval : "); print_ostr(str);
print_text("\n");
print_text("Current timestamp + Interval : "); print_ostr(str);
}
}
}
void test_describe(void)
{
int i, n;
print_text("\n>>>>> TEST DESCRIBING TABLE \n\n");
if (tbl)
{
print_text("Column Name NULL ? Type \n");
print_text("--------------------------------------------------------\n");
for(i = 1; i <= n; i++)
{
#if defined(OCI_CHARSET_WIDE)
#if !defined(_WINDOWS)
printf("%-20ls%-8ls%-30ls\n",
#else
wprintf(OTEXT("%-20s%-8s%-30s\n"),
#endif
#else
printf("%-20s%-8s%-30s\n",
#endif
str);
}
}
print_text("\n>>>>> TEST DESCRIBING TYPE \n\n");
if (tbl)
{
print_text("Column Name Type \n");
print_text("---------------------------------------------------\n");
for(i = 1; i <= n; i++)
{
#if defined(OCI_CHARSET_WIDE)
#if !defined(_WINDOWS)
printf("%-20ls%-30ls\n",
#else
wprintf(OTEXT("%-20s%-30s\n"),
#endif
#else
printf("%-20s%-30s\n",
#endif
}
}
}
void test_returning(void)
{
print_text("\n>>>>> TEST RETURNING CLAUSE \n\n");
OCI_Prepare(st, OTEXT(
"update test_lob set code = code + 1 returning code, content into :i, :l"));
{
print_ostr(temp);
print_text("\n");
}
}
void test_returning_array(void)
{
int i;
int tab_int [SIZE_TAB];
otext tab_str [SIZE_TAB][31];
float tab_flt [SIZE_TAB];
double tab_dbl [SIZE_TAB];
print_text("\n>>>>> TEST ARRAY BINDING WITH RETURNING CLAUSE \n\n");
OTEXT("( ")
OTEXT(" val_int, val_dbl, val_flt, val_str, val_date, ")
OTEXT(" val_lob, val_file ")
OTEXT(") " )
OTEXT("values ")
OTEXT("( ")
OTEXT(" :val_int, :val_dbl, :val_flt, :val_str, :val_date, ")
OTEXT(" :val_lob, :val_file ")
OTEXT(") ")
OTEXT("returning")
OTEXT(" val_int, val_dbl, val_flt, val_str, val_date, ")
OTEXT(" val_lob, val_file ")
OTEXT("into " )
OTEXT(" :out_int, :out_dbl, :out_flt, :out_str, :out_date, ")
OTEXT(" :out_lob, :out_file "));
for(i = 0; i < SIZE_TAB; i++)
{
tab_int[i] = i+1;
tab_dbl[i] = 3.14*(double)(i+1);
tab_flt[i] = (float) 3.14*(float)(i+1);
osprintf(tab_str[i], 31, OTEXT("Name%02i"), i+1);
osprintf(temp, SIZE_STR+1, OTEXT("lob value%02i"), i+1);
OCI_LobWrite(tab_lob[i], temp, (
unsigned int) ostrlen(temp));
osprintf(str, SIZE_STR+1, OTEXT("file%02i.txt"), i+1);
}
i = 1;
while (rs != NULL)
{
{
print_frmt("Row # %d-------------------\n", i);
print_frmt(
".... val_int : %i\n",
OCI_GetInt2(rs, OTEXT(
":OUT_INT")));
print_frmt(
".... val_dbl : %g\n",
OCI_GetDouble2(rs, OTEXT(
":OUT_DBL")));
print_frmt(
".... val_flt : %g\n",
OCI_GetFloat2(rs, OTEXT(
":OUT_FLT")));
print_text(
".... val_str : "); print_ostr(
OCI_GetString2(rs, OTEXT(
":OUT_STR")));
print_text("\n");
print_text(".... val_date : "); print_ostr(str);
print_text("\n");
print_text(".... val_lob : "); print_ostr(temp);
print_text("\n");
print_text(".... val_file : ");
print_text("/");
print_text("\n");
print_text("\n");
i++;
}
}
}
void test_object_insert(void)
{
char rawbuf[11];
strcpy(rawbuf, "0123456789");
print_text("\n>>>>> TEST OBJECT BINDING \n\n");
OCI_Prepare(st, OTEXT(
"insert into test_object values(:obj)"));
}
void test_object_fetch(void)
{
char rawbuf[11] = "";
print_text("\n>>>>> TEST OBJECT FETCHING \n\n");
{
print_text("\n");
print_text("val_raw : "); print_frmt("%s", rawbuf);
print_text("\n");
print_text("val_date : "); print_ostr(str);
print_text("\n");
print_text("val_lob : "); print_ostr(temp);
print_text("\n");
print_text("\n");
print_text("\n");
print_text("\n");
print_text("\n");;
}
}
void test_object_fetch_string(void)
{
print_text("\n>>>>> TEST OBJECT FETCHING AS STRING \n\n");
{
print_text("\n");
}
}
void test_scrollable_cursor(void)
{
{
print_text("\n>>>>> TEST SCROLLABLE CURSORS \n\n");
OTEXT("table_name like 'TEST_%' order by table_name"));
print_text("... Go to row 1\n");
{
print_text("\n");
}
{
print_text("\n");
}
print_frmt(
"... Enumerate from row %u back to row 1\n",
OCI_GetRowCount(rs)-1);
{
print_text("\n");
}
print_text("... Go to the 3th row\n");
{
print_text("\n");
}
print_text("... Fetch the next 2 rows\n");
{
print_text("\n");
}
}
}
void test_collection(void)
{
unsigned int i, n;
print_text("\n>>>>> TEST VARRAY BINDING \n\n");
OTEXT(" select employees into :tab_emp ")
OTEXT(" from test_coll_varray ")
OTEXT(" where departement = :id; ")
OTEXT("end;"));
i = 1;
print_frmt("Department ID #%u\n\n", i);
while (elem != NULL)
{
print_text("... Employee : ");
print_text("\n");
}
print_text("\n>>>>> TEST VARRAY FETCHING WITH ITERATOR \n\n");
{
print_frmt(
"\nDepartment ID #%d\n\n",
OCI_GetInt(rs, 1));
while (elem != NULL)
{
print_text("... Employee : ");
print_text("\n");
}
}
print_text("\n>>>>> TEST VARRAY PRINTING \n\n");
{
otext *tmp_str = (otext* ) calloc(n+1, sizeof(otext));
if (tmp_str)
{
print_ostr(tmp_str);
print_text("\n");
free(tmp_str);
}
}
print_text("\n>>>>> TEST NESTED TABLE FETCHING WITH INDEX ACCESS \n\n");
{
print_frmt(
"\nDepartment ID #%d\n\n",
OCI_GetInt(rs, 1));
for(i = 1; i <= n; i++)
{
print_text("... Employee : ");
print_text("\n");
}
}
}
void test_ref(void)
{
print_text("\n>>>>> TEST REF FETCHING \n\n");
{
print_text("\n");
}
print_text("\n>>>>> TEST REF PL/SQL BINDING \n\n");
OTEXT(" select ref(e) into :r from test_table_obj e where e.id = 1; ")
OTEXT("end; "));
print_text("\n");
}
void test_directpath(void)
{
{
boolean res = TRUE;
otext val1[SIZE_COL1+1] = OTEXT("");
otext val2[SIZE_COL2+1] = OTEXT("");
otext val3[SIZE_COL3+1] = OTEXT("");
int i = 0, j = 0, nb_rows = SIZE_ARRAY;
int state;
print_text("\n>>>>> TEST DIRECT PATH (10 loads of 100 rows) \n\n");
{
}
if (res)
{
for (i = 0; i < NB_LOAD ; i++)
{
for (j = 1; j <= nb_rows && res; j++)
{
osprintf(val1, SIZE_COL1+1, OTEXT("%04d"), i + (i*100));
osprintf(val2, SIZE_COL2+1, OTEXT("value %05d"), j + (i*100));
osprintf(val3, SIZE_COL3+1, OTEXT("%04d%02d%02d"), (j%23)+1 + 2000,
(j%11)+1,
(j%23)+1);
}
while (res == TRUE)
{
if ((state == OCI_DPR_FULL) || (state == OCI_DPR_COMPLETE))
if (state == OCI_DPR_COMPLETE || state == OCI_DPR_ERROR)
break;
}
}
if (res)
{
}
}
}
}
void test_bigint(void)
{
big_int value1 = 12345, value2 = 0;
print_text("\n>>>>> TEST BINDING BIG INT \n\n");
OCI_Prepare(st, OTEXT(
"begin :value2 := :value1 * :value1; end;"));
printf("\n%lld * %lld = %lld \n", value1, value1, value2);
}
void test_number()
{
unsigned int i, n;
print_text("\n>>>>> TEST ORACLE NUMBER \n\n");
OCI_Prepare(st, OTEXT(
"select value from test_number"));
{
print_ostr(str);
print_text(" - ");
print_ostr(buf);
print_text("\n");
}
print_ostr(str);
print_text("\n");
print_ostr(str);
print_text("\n");
OCI_Prepare(st, OTEXT(
"update test_number set value = value *2 returning value into :1"));
{
print_text("\n");
}
{
print_ostr(str);
print_text("\n");
}
print_ostr(str);
print_text("\n");
print_ostr(str);
print_text("\n");
OCI_Prepare(st, OTEXT(
"SELECT utl_raw.cast_to_number('FF65'), utl_raw.cast_to_number('00') from dual"));
{
print_text("pos infinite = ");
print_text("\n");
print_text("neg infinite = ");
print_text("\n");
}
print_ostr(str);
print_text("\n");
print_ostr(str);
print_text("\n");
print_ostr(str);
print_text("\n");
print_ostr(str);
print_text("\n");
print_ostr(str);
print_text("\n");
print_ostr(str);
print_text("\n");
}
OCI_SYM_PUBLIC boolean OCI_API OCI_BindArrayOfFloats(OCI_Statement *stmt, const otext *name, float *data, unsigned int nbelem)
Bind an array of floats.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindBigInt(OCI_Statement *stmt, const otext *name, big_int *data)
Bind a big integer variable.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindFloat(OCI_Statement *stmt, const otext *name, float *data)
Bind a float variable.
OCI_SYM_PUBLIC OCI_Bind *OCI_API OCI_GetBind(OCI_Statement *stmt, unsigned int index)
Return the bind handle at the given index in the internal array of bind handle.
OCI_SYM_PUBLIC void *OCI_API OCI_BindGetData(OCI_Bind *bnd)
Return the user defined data associated with a bind handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindString(OCI_Statement *stmt, const otext *name, otext *data, unsigned int len)
Bind a string variable.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindObject(OCI_Statement *stmt, const otext *name, OCI_Object *data)
Bind an object (named type) variable.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindLob(OCI_Statement *stmt, const otext *name, OCI_Lob *data)
Bind a Lob variable.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindArrayOfFiles(OCI_Statement *stmt, const otext *name, OCI_File **data, unsigned int type, unsigned int nbelem)
Bind an array of File handles.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindFile(OCI_Statement *stmt, const otext *name, OCI_File *data)
Bind a File variable.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindArrayOfDoubles(OCI_Statement *stmt, const otext *name, double *data, unsigned int nbelem)
Bind an array of doubles.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindArrayOfLobs(OCI_Statement *stmt, const otext *name, OCI_Lob **data, unsigned int type, unsigned int nbelem)
Bind an array of Lob handles.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindArrayOfInts(OCI_Statement *stmt, const otext *name, int *data, unsigned int nbelem)
Bind an array of integers.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindRef(OCI_Statement *stmt, const otext *name, OCI_Ref *data)
Bind a Ref variable.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindInt(OCI_Statement *stmt, const otext *name, int *data)
Bind an integer variable.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindLong(OCI_Statement *stmt, const otext *name, OCI_Long *data, unsigned int size)
Bind a Long variable.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindArrayOfDates(OCI_Statement *stmt, const otext *name, OCI_Date **data, unsigned int nbelem)
Bind an array of dates.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindArrayOfStrings(OCI_Statement *stmt, const otext *name, otext *data, unsigned int len, unsigned int nbelem)
Bind an array of strings.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindDate(OCI_Statement *stmt, const otext *name, OCI_Date *data)
Bind a date variable.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindArraySetSize(OCI_Statement *stmt, unsigned int size)
Set the input array size for bulk operations.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindColl(OCI_Statement *stmt, const otext *name, OCI_Coll *data)
Bind a Collection variable.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindUnsignedInt(OCI_Statement *stmt, const otext *name, unsigned int *data)
Bind an unsigned integer variable.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindStatement(OCI_Statement *stmt, const otext *name, OCI_Statement *data)
Bind a Statement variable (PL/SQL Ref Cursor)
OCI_SYM_PUBLIC boolean OCI_API OCI_BindDouble(OCI_Statement *stmt, const otext *name, double *data)
Bind a double variable.
OCI_SYM_PUBLIC boolean OCI_API OCI_BindNumber(OCI_Statement *stmt, const otext *name, OCI_Number *data)
Bind an Number variable.
OCI_SYM_PUBLIC boolean OCI_API OCI_ElemSetNumber(OCI_Elem *elem, OCI_Number *value)
Set a number value to a collection element.
OCI_SYM_PUBLIC boolean OCI_API OCI_CollAppend(OCI_Coll *coll, OCI_Elem *elem)
Append the given element at the end of the collection.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_CollGetSize(OCI_Coll *coll)
Returns the total number of elements of the given collection.
OCI_SYM_PUBLIC OCI_Iter *OCI_API OCI_IterCreate(OCI_Coll *coll)
Create an iterator handle to iterate through a collection.
OCI_SYM_PUBLIC boolean OCI_API OCI_ElemFree(OCI_Elem *elem)
Free a local collection element.
OCI_SYM_PUBLIC boolean OCI_API OCI_CollFree(OCI_Coll *coll)
Free a local collection.
OCI_SYM_PUBLIC boolean OCI_API OCI_IterFree(OCI_Iter *iter)
Free an iterator handle.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_CollGetCount(OCI_Coll *coll)
Returns the current number of elements of the given collection.
OCI_SYM_PUBLIC OCI_Elem *OCI_API OCI_CollGetElem(OCI_Coll *coll, unsigned int index)
Return the element at the given position in the collection.
OCI_SYM_PUBLIC OCI_Elem *OCI_API OCI_IterGetNext(OCI_Iter *iter)
Get the next element in the collection.
OCI_SYM_PUBLIC boolean OCI_API OCI_CollToText(OCI_Coll *coll, unsigned int *size, otext *str)
Convert a collection handle value to a string.
OCI_SYM_PUBLIC OCI_Elem *OCI_API OCI_ElemCreate(OCI_TypeInfo *typinf)
Create a local collection element instance based on a collection type descriptor.
OCI_SYM_PUBLIC OCI_Number *OCI_API OCI_ElemGetNumber(OCI_Elem *elem)
Return the number value of the given collection element.
OCI_SYM_PUBLIC const otext *OCI_API OCI_ElemGetString(OCI_Elem *elem)
Return the String value of the given collection element.
OCI_SYM_PUBLIC OCI_Coll *OCI_API OCI_CollCreate(OCI_TypeInfo *typinf)
Create a local collection instance.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetServerRevisionVersion(OCI_Connection *con)
Return the revision version number of the connected database server.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetServerMinorVersion(OCI_Connection *con)
Return the minor version number of the connected database server.
OCI_SYM_PUBLIC boolean OCI_API OCI_ConnectionFree(OCI_Connection *con)
Close a physical connection to an Oracle database server.
OCI_SYM_PUBLIC const otext *OCI_API OCI_GetVersionServer(OCI_Connection *con)
Return the connected database server version string (aka server banner version) as reported by SQL*Pl...
OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetVersionConnection(OCI_Connection *con)
Return the highest Oracle version is supported by the connection.
OCI_SYM_PUBLIC OCI_Connection *OCI_API OCI_ConnectionCreate(const otext *db, const otext *user, const otext *pwd, unsigned int mode)
Create a physical connection to an Oracle database server.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetServerMajorVersion(OCI_Connection *con)
Return the major version number of the connected database server.
struct OCI_Ref OCI_Ref
Oracle REF type representation.
struct OCI_Elem OCI_Elem
Oracle Collection item representation.
struct OCI_Connection OCI_Connection
Oracle physical connection.
struct OCI_Object OCI_Object
Oracle Named types representation.
struct OCI_Statement OCI_Statement
Oracle SQL or PL/SQL statement.
struct OCI_Timestamp OCI_Timestamp
Oracle internal timestamp representation.
struct OCI_Date OCI_Date
Oracle internal date representation.
struct OCI_Coll OCI_Coll
Oracle Collections (VARRAYs and Nested Tables) representation.
struct OCI_DirPath OCI_DirPath
OCILIB encapsulation of OCI Direct Path handle.
struct OCI_Error OCI_Error
Encapsulates an Oracle or OCILIB exception.
long long big_int
big_int is a C scalar integer (32 or 64 bits) depending on compiler support for 64bits integers....
struct OCI_Lob OCI_Lob
Oracle Internal Large objects:
struct OCI_Long OCI_Long
Oracle Long data type.
struct OCI_Column OCI_Column
Oracle SQL Column and Type member representation.
struct OCI_Interval OCI_Interval
Oracle internal interval representation.
struct OCI_Number OCI_Number
Oracle NUMBER representation.
struct OCI_TypeInfo OCI_TypeInfo
Type info metadata handle.
struct OCI_File OCI_File
Oracle External Large objects:
struct OCI_Resultset OCI_Resultset
Collection of output columns from a select statement.
struct OCI_Iter OCI_Iter
Oracle Collection iterator representation.
OCI_SYM_PUBLIC boolean OCI_API OCI_DateFromText(OCI_Date *date, const otext *str, const otext *fmt)
Convert a string to a date and store it in the given date handle.
OCI_SYM_PUBLIC OCI_Date *OCI_API OCI_DateCreate(OCI_Connection *con)
Create a local date object.
OCI_SYM_PUBLIC boolean OCI_API OCI_DateLastDay(OCI_Date *date)
Place the last day of month (from the given date) into the given date.
OCI_SYM_PUBLIC OCI_Date **OCI_API OCI_DateArrayCreate(OCI_Connection *con, unsigned int nbelem)
Create an array of date object.
OCI_SYM_PUBLIC int OCI_API OCI_DateDaysBetween(OCI_Date *date, OCI_Date *date2)
Return the number of days betWeen two dates.
OCI_SYM_PUBLIC int OCI_API OCI_DateAssign(OCI_Date *date, OCI_Date *date_src)
Assign the value of a date handle to another one.
OCI_SYM_PUBLIC boolean OCI_API OCI_DateFree(OCI_Date *date)
Free a date object.
OCI_SYM_PUBLIC boolean OCI_API OCI_DateAddMonths(OCI_Date *date, int nb)
Add or subtract months to a date handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_DateAddDays(OCI_Date *date, int nb)
Add or subtract days to a date handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_DateToText(OCI_Date *date, const otext *fmt, int size, otext *str)
Convert a Date value from the given date handle to a string.
OCI_SYM_PUBLIC boolean OCI_API OCI_DateArrayFree(OCI_Date **dates)
Free an array of date objects.
OCI_SYM_PUBLIC boolean OCI_API OCI_DateSysDate(OCI_Date *date)
Return the current system date/time into the date handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetParallel(OCI_DirPath *dp, boolean value)
Set the parallel loading mode.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetColumn(OCI_DirPath *dp, unsigned int index, const otext *name, unsigned int maxsize, const otext *format)
Describe a column to load into the given table.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathFinish(OCI_DirPath *dp)
Terminate a direct path operation and commit changes into the database.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DirPathConvert(OCI_DirPath *dp)
Convert provided user data to the direct path stream format.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetCacheSize(OCI_DirPath *dp, unsigned int size)
Set number of elements in the date cache.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetBufferSize(OCI_DirPath *dp, unsigned int size)
Set the size of the internal stream transfer buffer.
OCI_SYM_PUBLIC OCI_DirPath *OCI_API OCI_DirPathCreate(OCI_TypeInfo *typinf, const otext *partition, unsigned int nb_cols, unsigned int nb_rows)
Create a direct path object.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetNoLog(OCI_DirPath *dp, boolean value)
Set the logging mode for the loading operation.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetEntry(OCI_DirPath *dp, unsigned int row, unsigned int index, void *value, unsigned size, boolean complete)
Set the value of the given row/column array entry.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathPrepare(OCI_DirPath *dp)
Prepares the OCI direct path load interface before any rows can be converted or loaded.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathFree(OCI_DirPath *dp)
Free an OCI_DirPath handle.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DirPathGetRowCount(OCI_DirPath *dp)
Return the number of rows successfully loaded into the database so far.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DirPathGetMaxRows(OCI_DirPath *dp)
Return the maximum number of rows allocated in the OCI and OCILIB internal arrays of rows.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathReset(OCI_DirPath *dp)
Reset internal arrays and streams to prepare another load.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DirPathLoad(OCI_DirPath *dp)
Loads the data converted to direct path stream format.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_ErrorGetType(OCI_Error *err)
Retrieve the type of error from error handle.
OCI_SYM_PUBLIC const otext *OCI_API OCI_ErrorGetString(OCI_Error *err)
Retrieve error message from error handle.
OCI_SYM_PUBLIC OCI_Error *OCI_API OCI_GetLastError(void)
Retrieve the last error or warning occurred within the last OCILIB call.
OCI_SYM_PUBLIC boolean OCI_API OCI_RegisterLob(OCI_Statement *stmt, const otext *name, unsigned int type)
Register a lob output bind placeholder.
OCI_SYM_PUBLIC boolean OCI_API OCI_RegisterInt(OCI_Statement *stmt, const otext *name)
Register an integer output bind placeholder.
OCI_SYM_PUBLIC boolean OCI_API OCI_RegisterDouble(OCI_Statement *stmt, const otext *name)
Register a double output bind placeholder.
OCI_SYM_PUBLIC OCI_Resultset *OCI_API OCI_GetNextResultset(OCI_Statement *stmt)
Retrieve the next available resultset.
OCI_SYM_PUBLIC boolean OCI_API OCI_RegisterDate(OCI_Statement *stmt, const otext *name)
Register a date output bind placeholder.
OCI_SYM_PUBLIC boolean OCI_API OCI_RegisterString(OCI_Statement *stmt, const otext *name, unsigned int len)
Register a string output bind placeholder.
OCI_SYM_PUBLIC boolean OCI_API OCI_RegisterNumber(OCI_Statement *stmt, const otext *name)
Register a register output bind placeholder.
OCI_SYM_PUBLIC boolean OCI_API OCI_RegisterFile(OCI_Statement *stmt, const otext *name, unsigned int type)
Register a file output bind placeholder.
OCI_SYM_PUBLIC boolean OCI_API OCI_RegisterFloat(OCI_Statement *stmt, const otext *name)
Register a float output bind placeholder.
OCI_SYM_PUBLIC OCI_Ref *OCI_API OCI_GetRef(OCI_Resultset *rs, unsigned int index)
Return the current Ref value of the column at the given index in the resultset.
OCI_SYM_PUBLIC OCI_Date *OCI_API OCI_GetDate2(OCI_Resultset *rs, const otext *name)
Return the current date value of the column from its name in the resultset.
OCI_SYM_PUBLIC OCI_Statement *OCI_API OCI_GetStatement(OCI_Resultset *rs, unsigned int index)
Return the current cursor value (Nested table) of the column at the given index in the resultset.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_ColumnGetFullSQLType(OCI_Column *col, otext *buffer, unsigned int len)
Return the Oracle SQL Full name including precision and size of the column data type.
OCI_SYM_PUBLIC boolean OCI_API OCI_ColumnGetNullable(OCI_Column *col)
Return the nullable attribute of the column.
OCI_SYM_PUBLIC OCI_Lob *OCI_API OCI_GetLob(OCI_Resultset *rs, unsigned int index)
Return the current lob value of the column at the given index in the resultset.
OCI_SYM_PUBLIC OCI_Number *OCI_API OCI_GetNumber(OCI_Resultset *rs, unsigned int index)
Return the current Number value of the column at the given index in the resultset.
OCI_SYM_PUBLIC boolean OCI_API OCI_FetchSeek(OCI_Resultset *rs, unsigned int mode, int offset)
Custom Fetch of the resultset.
OCI_SYM_PUBLIC boolean OCI_API OCI_FetchPrev(OCI_Resultset *rs)
Fetch the previous row of the resultset.
OCI_SYM_PUBLIC const otext *OCI_API OCI_GetString2(OCI_Resultset *rs, const otext *name)
Return the current string value of the column from its name in the resultset.
OCI_SYM_PUBLIC boolean OCI_API OCI_FetchLast(OCI_Resultset *rs)
Fetch the last row of the resultset.
OCI_SYM_PUBLIC double OCI_API OCI_GetDouble2(OCI_Resultset *rs, const otext *name)
Return the current double value of the column from its name in the resultset.
OCI_SYM_PUBLIC boolean OCI_API OCI_FetchNext(OCI_Resultset *rs)
Fetch the next row of the resultset.
OCI_SYM_PUBLIC OCI_Long *OCI_API OCI_GetLong(OCI_Resultset *rs, unsigned int index)
Return the current Long value of the column at the given index in the resultset.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetRowCount(OCI_Resultset *rs)
Retrieve the number of rows fetched so far.
OCI_SYM_PUBLIC const otext *OCI_API OCI_GetString(OCI_Resultset *rs, unsigned int index)
Return the current string value of the column at the given index in the resultset.
OCI_SYM_PUBLIC OCI_Lob *OCI_API OCI_GetLob2(OCI_Resultset *rs, const otext *name)
Return the current lob value of the column from its name in the resultset.
OCI_SYM_PUBLIC OCI_Column *OCI_API OCI_GetColumn(OCI_Resultset *rs, unsigned int index)
Return the column object handle at the given index in the resultset.
OCI_SYM_PUBLIC OCI_File *OCI_API OCI_GetFile2(OCI_Resultset *rs, const otext *name)
Return the current File value of the column from its name in the resultset.
OCI_SYM_PUBLIC float OCI_API OCI_GetFloat2(OCI_Resultset *rs, const otext *name)
Return the current float value of the column from its name in the resultset.
OCI_SYM_PUBLIC const otext *OCI_API OCI_ColumnGetName(OCI_Column *col)
Return the name of the given column.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetColumnCount(OCI_Resultset *rs)
Return the number of columns in the resultset.
OCI_SYM_PUBLIC OCI_Resultset *OCI_API OCI_GetResultset(OCI_Statement *stmt)
Retrieve the resultset handle from an executed statement.
OCI_SYM_PUBLIC OCI_Coll *OCI_API OCI_GetColl(OCI_Resultset *rs, unsigned int index)
Return the current Collection value of the column at the given index in the resultset.
OCI_SYM_PUBLIC int OCI_API OCI_GetInt(OCI_Resultset *rs, unsigned int index)
Return the current integer value of the column at the given index in the resultset.
OCI_SYM_PUBLIC boolean OCI_API OCI_FetchFirst(OCI_Resultset *rs)
Fetch the first row of the resultset.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetCurrentRow(OCI_Resultset *rs)
Retrieve the current row number.
OCI_SYM_PUBLIC double OCI_API OCI_GetDouble(OCI_Resultset *rs, unsigned int index)
Return the current double value of the column at the given index in the resultset.
OCI_SYM_PUBLIC int OCI_API OCI_GetInt2(OCI_Resultset *rs, const otext *name)
Return the current integer value of the column from its name in the resultset.
OCI_SYM_PUBLIC OCI_Object *OCI_API OCI_GetObject(OCI_Resultset *rs, unsigned int index)
Return the current Object value of the column at the given index in the resultset.
OCI_SYM_PUBLIC const otext *OCI_API OCI_FileGetName(OCI_File *file)
Return the name of the given file.
OCI_SYM_PUBLIC OCI_File *OCI_API OCI_FileCreate(OCI_Connection *con, unsigned int type)
Create a file object instance.
OCI_SYM_PUBLIC OCI_File **OCI_API OCI_FileArrayCreate(OCI_Connection *con, unsigned int type, unsigned int nbelem)
Create an array of file object.
OCI_SYM_PUBLIC const otext *OCI_API OCI_FileGetDirectory(OCI_File *file)
Return the directory of the given file.
OCI_SYM_PUBLIC boolean OCI_API OCI_FileSetName(OCI_File *file, const otext *dir, const otext *name)
Set the directory and file name of FILE handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_FileFree(OCI_File *file)
Free a local File object.
OCI_SYM_PUBLIC boolean OCI_API OCI_FileArrayFree(OCI_File **files)
Free an array of file objects.
OCI_SYM_PUBLIC boolean OCI_API OCI_Cleanup(void)
Clean up all resources allocated by the library.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetOCICompileVersion(void)
Return the version of OCI used for compilation.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetCharset(void)
Return the OCILIB charset type.
OCI_SYM_PUBLIC boolean OCI_API OCI_EnableWarnings(boolean value)
Enable or disable Oracle warning notifications.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetOCIRuntimeVersion(void)
Return the version of OCI used at runtime.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetImportMode(void)
Return the Oracle shared library import mode.
OCI_SYM_PUBLIC boolean OCI_API OCI_Initialize(POCI_ERROR err_handler, const otext *lib_path, unsigned int mode)
Initialize the library.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_LobWrite(OCI_Lob *lob, void *buffer, unsigned int len)
[OBSOLETE] Write a buffer into a LOB
OCI_SYM_PUBLIC boolean OCI_API OCI_LobFree(OCI_Lob *lob)
Free a local temporary lob.
OCI_SYM_PUBLIC OCI_Lob *OCI_API OCI_LobCreate(OCI_Connection *con, unsigned int type)
Create a local temporary Lob instance.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_LobRead(OCI_Lob *lob, void *buffer, unsigned int len)
[OBSOLETE] Read a portion of a lob into the given buffer
OCI_SYM_PUBLIC boolean OCI_API OCI_LobArrayFree(OCI_Lob **lobs)
Free an array of lob objects.
OCI_SYM_PUBLIC OCI_Lob **OCI_API OCI_LobArrayCreate(OCI_Connection *con, unsigned int type, unsigned int nbelem)
Create an array of lob object.
OCI_SYM_PUBLIC boolean OCI_API OCI_LobSeek(OCI_Lob *lob, big_uint offset, unsigned int mode)
Perform a seek operation on the OCI_lob content buffer.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_LobAppend(OCI_Lob *lob, void *buffer, unsigned int len)
Append a buffer at the end of a LOB.
OCI_SYM_PUBLIC boolean OCI_API OCI_LongFree(OCI_Long *lg)
Free a local temporary long.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_LongGetSize(OCI_Long *lg)
Return the buffer size of a long object in bytes (OCI_BLONG) or character (OCI_CLONG)
OCI_SYM_PUBLIC unsigned int OCI_API OCI_LongRead(OCI_Long *lg, void *buffer, unsigned int len)
Read a portion of a long into the given buffer [Obsolete].
OCI_SYM_PUBLIC unsigned int OCI_API OCI_LongWrite(OCI_Long *lg, void *buffer, unsigned int len)
Write a buffer into a Long.
OCI_SYM_PUBLIC OCI_Long *OCI_API OCI_LongCreate(OCI_Statement *stmt, unsigned int type)
Create a local temporary Long instance.
OCI_SYM_PUBLIC boolean OCI_API OCI_NumberArrayFree(OCI_Number **numbers)
Free an array of number objects.
OCI_SYM_PUBLIC OCI_Number **OCI_API OCI_NumberArrayCreate(OCI_Connection *con, unsigned int nbelem)
Create an array of number object.
OCI_SYM_PUBLIC boolean OCI_API OCI_NumberFree(OCI_Number *number)
Free a number object.
OCI_SYM_PUBLIC boolean OCI_API OCI_NumberFromText(OCI_Number *number, const otext *str, const otext *fmt)
Convert a string to a number and store it in the given number handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_NumberToText(OCI_Number *number, const otext *fmt, int size, otext *str)
Convert a number value from the given number handle to a string.
OCI_SYM_PUBLIC OCI_Number *OCI_API OCI_NumberCreate(OCI_Connection *con)
Create a local number object.
OCI_SYM_PUBLIC const otext *OCI_API OCI_ServerGetOutput(OCI_Connection *con)
Retrieve one line of the server buffer.
OCI_SYM_PUBLIC boolean OCI_API OCI_ServerDisableOutput(OCI_Connection *con)
Disable the server output.
OCI_SYM_PUBLIC boolean OCI_API OCI_ServerEnableOutput(OCI_Connection *con, unsigned int bufsize, unsigned int arrsize, unsigned int lnsize)
Enable the server output.
OCI_SYM_PUBLIC boolean OCI_API OCI_SetFetchMode(OCI_Statement *stmt, unsigned int mode)
Set the fetch mode of a SQL statement.
OCI_SYM_PUBLIC boolean OCI_API OCI_SetBindAllocation(OCI_Statement *stmt, unsigned int mode)
Set the current bind allocation mode that will be used for subsequent binding calls.
OCI_SYM_PUBLIC boolean OCI_API OCI_SetLongMode(OCI_Statement *stmt, unsigned int mode)
Set the long data type handling mode of a SQL statement.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetAffectedRows(OCI_Statement *stmt)
Return the number of rows affected by the SQL statement.
OCI_SYM_PUBLIC OCI_Statement *OCI_API OCI_StatementCreate(OCI_Connection *con)
Create a statement object and return its handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_ExecuteStmt(OCI_Statement *stmt, const otext *sql)
Prepare and Execute a SQL statement or PL/SQL block.
OCI_SYM_PUBLIC boolean OCI_API OCI_StatementFree(OCI_Statement *stmt)
Free a statement and all resources associated to it (resultsets ...)
OCI_SYM_PUBLIC boolean OCI_API OCI_Prepare(OCI_Statement *stmt, const otext *sql)
Prepare a SQL statement or PL/SQL block.
OCI_SYM_PUBLIC boolean OCI_API OCI_Execute(OCI_Statement *stmt)
Execute a prepared SQL statement or PL/SQL block.
OCI_SYM_PUBLIC OCI_Interval *OCI_API OCI_IntervalCreate(OCI_Connection *con, unsigned int type)
Create a local interval object.
OCI_SYM_PUBLIC boolean OCI_API OCI_IntervalFree(OCI_Interval *itv)
Free an OCI_Interval handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_TimestampIntervalAdd(OCI_Timestamp *tmsp, OCI_Interval *itv)
Add an interval value to a timestamp value of a timestamp handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_TimestampFree(OCI_Timestamp *tmsp)
Free an OCI_Timestamp handle.
OCI_SYM_PUBLIC OCI_Timestamp *OCI_API OCI_TimestampCreate(OCI_Connection *con, unsigned int type)
Create a local Timestamp instance.
OCI_SYM_PUBLIC boolean OCI_API OCI_TimestampSysTimestamp(OCI_Timestamp *tmsp)
Stores the system current date and time as a timestamp value with time zone into the timestamp handle...
OCI_SYM_PUBLIC boolean OCI_API OCI_TimestampToText(OCI_Timestamp *tmsp, const otext *fmt, int size, otext *str, int precision)
Convert a timestamp value from the given timestamp handle to a string.
OCI_SYM_PUBLIC boolean OCI_API OCI_IntervalToText(OCI_Interval *itv, int leading_prec, int fraction_prec, int size, otext *str)
Convert an interval value from the given interval handle to a string.
OCI_SYM_PUBLIC boolean OCI_API OCI_IntervalSetDaySecond(OCI_Interval *itv, int day, int hour, int min, int sec, int fsec)
Set the day / time portion if the given interval handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_Commit(OCI_Connection *con)
Commit current pending changes.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetRaw(OCI_Object *obj, const otext *attr, void *value, unsigned int len)
Set an object attribute of type RAW.
OCI_SYM_PUBLIC OCI_Object *OCI_API OCI_RefGetObject(OCI_Ref *ref)
Returns the object pointed by the Ref handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetString(OCI_Object *obj, const otext *attr, const otext *value)
Set an object attribute of type string.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectFree(OCI_Object *obj)
Free a local object.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetDouble(OCI_Object *obj, const otext *attr, double value)
Set an object attribute of type double.
OCI_SYM_PUBLIC int OCI_API OCI_ObjectGetInt(OCI_Object *obj, const otext *attr)
Return the integer value of the given object attribute.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetInt(OCI_Object *obj, const otext *attr, int value)
Set an object attribute of type int.
OCI_SYM_PUBLIC const otext *OCI_API OCI_ObjectGetString(OCI_Object *obj, const otext *attr)
Return the string value of the given object attribute.
OCI_SYM_PUBLIC OCI_Object *OCI_API OCI_ObjectGetObject(OCI_Object *obj, const otext *attr)
Return the object value of the given object attribute.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetObject(OCI_Object *obj, const otext *attr, OCI_Object *value)
Set an object attribute of type Object.
OCI_SYM_PUBLIC OCI_File *OCI_API OCI_ObjectGetFile(OCI_Object *obj, const otext *attr)
Return the file value of the given object attribute.
OCI_SYM_PUBLIC float OCI_API OCI_ObjectGetFloat(OCI_Object *obj, const otext *attr)
Return the float value of the given object attribute.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetDate(OCI_Object *obj, const otext *attr, OCI_Date *value)
Set an object attribute of type Date.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetFile(OCI_Object *obj, const otext *attr, OCI_File *value)
Set an object attribute of type File.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetNumber(OCI_Object *obj, const otext *attr, OCI_Number *value)
Set an object attribute of type number.
OCI_SYM_PUBLIC boolean OCI_API OCI_RefFree(OCI_Ref *ref)
Free a local Ref.
OCI_SYM_PUBLIC OCI_Object *OCI_API OCI_ObjectCreate(OCI_Connection *con, OCI_TypeInfo *typinf)
Create a local object instance.
OCI_SYM_PUBLIC OCI_Ref *OCI_API OCI_RefCreate(OCI_Connection *con, OCI_TypeInfo *typinf)
Create a local Ref instance.
OCI_SYM_PUBLIC int OCI_API OCI_ObjectGetRaw(OCI_Object *obj, const otext *attr, void *value, unsigned int len)
Return the raw attribute value of the given object attribute into the given buffer.
OCI_SYM_PUBLIC OCI_Lob *OCI_API OCI_ObjectGetLob(OCI_Object *obj, const otext *attr)
Return the lob value of the given object attribute.
OCI_SYM_PUBLIC OCI_Date *OCI_API OCI_ObjectGetDate(OCI_Object *obj, const otext *attr)
Return the date value of the given object attribute.
OCI_SYM_PUBLIC double OCI_API OCI_ObjectGetDouble(OCI_Object *obj, const otext *attr)
Return the double value of the given object attribute.
OCI_SYM_PUBLIC OCI_Number *OCI_API OCI_ObjectGetNumber(OCI_Object *obj, const otext *attr)
Return the number value of the given object attribute.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetFloat(OCI_Object *obj, const otext *attr, float value)
Set an object attribute of type float.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetLob(OCI_Object *obj, const otext *attr, OCI_Lob *value)
Set an object attribute of type Lob.