Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> oci trouble

oci trouble

From: stef <stef.pellegrino_at_gmail.com>
Date: 14 Mar 2006 16:35:50 -0800
Message-ID: <1142378374.871541.47480@j52g2000cwj.googlegroups.com>


Hello guys,

Could you tell me why, under XP & Oracle client 10.0.1 this little piece of code crashes on
OCIStmtExecute() ?

int r;
OCIStmt *p_sql;
char *query = "BEGIN open :cur1 FOR select 1,2,3 FROM dual; open :cur2 FOR select 1,2,3 FROM dual; end;";
dvoid *curs1, *curs2;
OCIBind *bind;

r = OCILogon(env, err, &svc, ....);

//---- connection to Oracle server is ok...

r = OCIHandleAlloc(env, &p_sql, OCI_HTYPE_STMT, (size_t) 0, (dvoid **) 0);

r = OCIStmtPrepare(p_sql, err, query, strlen(query), OCI_NTV_SYNTAX, OCI_DEFAULT); r = OCIHandleAlloc(env, &curs1, OCI_HTYPE_STMT, 0, NULL); r = OCIBindByName(p_sql, &bind, err, ":cur1", -1, &curs1, 0, SQLT_RSET, 0, 0, 0, 0, 0, OCI_DEFAULT); r = OCIHandleAlloc(env, &curs2, OCI_HTYPE_STMT, 0, NULL); r = OCIBindByName(p_sql, &bind, err, ":cur2", -1, &curs2, 0, SQLT_RSET, 0, 0, 0, 0, 0, OCI_DEFAULT);
//---- at this time, no errors were returned by Oracle, now...

//---- now error with "Unhandled error with ORACOMMON10.dll"
r = OCIStmtExecute(svc, p_sql, err, 1, 0, NULL, NULL, OCI_COMMIT_ON_SUCCESS); Where is my fault ??

thanx... Received on Tue Mar 14 2006 - 18:35:50 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US