OCIRowid returns Rowid of alternate rows.

From: <ugtech_at_my-deja.com>
Date: Tue, 12 Oct 1999 05:32:01 GMT
Message-ID: <7tuh4h$47o$1_at_nnrp1.deja.com>



Hi All.

I am new to Oracle and OCI.

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.

Thanks.
Geeta.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Oct 12 1999 - 07:32:01 CEST

Original text of this message