Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    3

    Unanswered: Oracle/OCCI usage for Stored Proc execution

    Hi:

    I compile the statement to call INSERTFOO stored procedure, which inserts into values (1,2) into a table foo from a C++ program using OCCI.

    The program compiles ok, runs ok, however the procedure doesn't execute.

    Here is the SQL string passed for execution:
    "BEGIN INSERTFOO (); END;"

    As per the convention:
    I first call the
    conn->createStatement(); // and then
    conn->setSQL(strSQL); // and then
    stmt->executeUpdate(); //

    The log file shows the following:
    114123.146678 ====== PID 9054 BEGIN LOG SESSION ======
    T 114123.146584 OCCI create environment
    T 114123.148256 OCCI create connection
    T 114123.181423 PREPARE> BEGIN INSERTFOO; END ;
    T 114123.181709 PREPARED UPDATE
    114123.192502 ======= PID 9054 END LOG SESSION =======


    Am I missing some permissions? Am I misformatting SQL?

    Really appreciate your help.

    Thanks,
    Anish

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >however the procedure doesn't execute
    How/why do you reach this conclusion?
    Might a COMMIT be needed to make sure Oracle saves away the changes?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jul 2004
    Posts
    3
    Thanks. This works. I actually found this out myself as well when I replaced the stored Proc with an actual statement and when that didn't work, I found out that the ExecuteUpdate library call didn't have an update, which I assumed

  4. #4
    Join Date
    Jul 2004
    Posts
    3
    .. library call for ExecuteUpdate didn't have commit (not update) is what I meant.
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •