This content has been marked as final. Show 2 replies
Well, it seems that until the statement is actually parsed by oracle this information is not available. I.e. until OCIStmtExecute() is called.
As I wanted the info to help decide how to call OCIStmtExecute() I am in a bit of a catch 22 situation.
I have resorted to parsing the statement myself (well, checking the first word) to determine the type of statement.
I just had the same issue. However the attribute OCI_ATTR_STMT_TYPE is available right after OCIStmtPrepare and can be used to crudely determine the type of statement. Typical problem is to figure out how many iterations to set up for the OCIStmtExecute call; it can be determined from the OCI_ATTR_STMT_TYPE attribute.