OCI function
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: OCI function

  1. #1
    Join Date
    Sep 2000
    Posts
    14

    Unhappy

    Hi,

    Our C program uses the following OCIfunction to execute SQL statements
    and we always get the ORA-00911 error. Our SQL statement terminate by a semicolon.

    OCIStmtExecute(mysvchp,
    mystmthp,
    errhp,
    (ub4) iterations,
    (ub4) 0,
    (CONST OCISnapshot *) NULL,
    (OCISnapshot *) NULL,
    OCI_DEFAULT)

    When we remove the ";" in our SQL statements we don't have this error.
    My question is how the above function execute a SQL statement in the DB.
    I know that in SQL*Plus you can't run a SQL statement with a ";"
    i.e
    select*
    from test;
    /
    Thanks


    mcl

  2. #2
    Join Date
    Jun 2000
    Posts
    417
    typically in any database when using libraries to connect and run statements you never need the semicolon. in client programs like sqlplus, it needs to know when you're done typing and the statement is done. the libraries are executing one pre-prepared statement so you don't have to terminate it with the semicolon.

Posting Permissions

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



Click Here to Expand Forum to Full Width