2009-11-05 09:56:48 UTC
Hi,
Of course...
Here is a test case :
#include "ocilib.h"
int main(void)
{
OCI_Connection *cn;
OCI_Statement *st;
OCI_Initialize(NULL, NULL, OCI_ENV_CONTEXT);
cn = OCI_ConnectionCreate("db", "usr", "pwd", OCI_SESSION_DEFAULT);
st = OCI_StatementCreate(cn);
if (!OCI_ExecuteStmt(st, "select first_bad_col from bad_table"))
{
printf("%s\n", OCI_ErrorGetString(OCI_GetLastError()));
}
if (!OCI_ExecuteStmt(st, "select second_bad_col from bad_table"))
{
printf(OCI_ErrorGetString(OCI_GetLastError()));
}
if (!OCI_ExecuteStmt(st, "select 'good_query' from dual"))
{
printf("%s\n", OCI_ErrorGetString(OCI_GetLastError()));
}
else
{
printf("\nok\n");
}
OCI_Cleanup();
return EXIT_SUCCESS;
}
and the output
> ORA-00942: Table ou vue inexistante
>
> ORA-00942: Table ou vue inexistante
>
> ok
You can try to add OCI_ENV_THREADED to OCI_Initialize()