1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
int main(void)
{
OCI_Connection *cn;
OCI_Statement *st;
int param1;
OCI_Initialize(err_handler, NULL, OCI_ENV_DEFAULT);
cn = OCI_ConnectionCreate("db", "usr", "pwd", OCI_SESSION_DEFAULT);
st = OCI_StatementCreate(cn);
OCI_Prepare(st, "BEGIN PA_Package.test_proc(:param1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 'toto'); END;");
OCI_BindInt(st, ":param1", ¶m1);
param1 = 0;
cout << "avant" << endl;
OCI_Execute(st);
cout << "après" << endl;
OCI_Commit(cn);
printf("param1 = %i\n", param1);
OCI_Cleanup();
RETURN EXIT_SUCCESS;
} |
Partager