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

Home -> Community -> Usenet -> c.d.o.server -> OCIRowid returns Rowid of alternate rows.

OCIRowid returns Rowid of alternate rows.

From: <ugtech_at_my-deja.com>
Date: Sat, 09 Oct 1999 09:28:13 GMT
Message-ID: <7tn1r9$3ks$1@nnrp1.deja.com>


Hi All.

I am using OCIRowid to update the record selected from the cursor. I find that alternate records are getting updated.

My code is as follows.

// Fetch the next record.

OCIStmtFetch(m_pStmtHandle, m_pErrorHandle, 1, OCI_FETCH_NEXT, OCI_DEFAULT);
// Get the Rowid

OCIDescriptorAlloc(m_pEnvHandle, (dvoid **) &m_RowId, OCI_DTYPE_ROWID, 0, NULL); OCIAttrGet((dvoid*) m_pStmtHandle,OCI_HTYPE_STMT,(dvoid*) m_RowId, (ub4*) 0, OCI_ATTR_ROWID, (OCIError*) m_pErrorHandle);

// Bind the Rowid to the update statement handle.
OCIBind* pBindHandle = 0;
OCIBindByPos(pStmtHandle, &pBindHandle, m_pErrorHandle,1, (dvoid*) &m_RowId,(sb4) 0 , SQLT_RDD,(dvoid*) 0,(ub2*)0,(ub2*)0,(ub4)0,(ub4*) 0,OCI_DEFAULT))
// Execute the statement.

OCIStmtExecute(m_pSvcCtxHandle, pStmtHandle, m_pErrorHandle, (ub4)1, ub4 (0), (OCISnapshot*) NULL, (OCISnapshot* )0, ((m_bAutoCommit)? (OCI_COMMIT_ON_SUCCESS):(OCI_DEFAULT)); Can anyone please help.
This is urgent.

P.S. I found the same problem reported by someone else, but couldnt find the solution to this in the newsgroup.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sat Oct 09 1999 - 04:28:13 CDT

Original text of this message

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