Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Doubt on SQLBulkOperations
Hello,
I am getting an error when using SQLBulkOperations in ODBC with Oracle 8.1.5 driver. THe code is as given below. The erros is that the call to the SQLBulkOperations returns me the code SQL_NEED_DATA where as i have already bound the columns to the buffers and filled their values also...
Can somebody help me out of this situation?
Thanks in advance for the help,
rgds,
Dipu K.
////////////////////////////////////////////////////////////
// create the statement string std::wstring sqlString; hr = FormSQLString(..., sqlString); retcode = SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_ARRAY_SIZE,(SQLPOINTER)nRow, 0);
SQLINTEGER* pSize = new SQLINTEGER[nRow * nCol]; for (int m = 1; m <= nCol; ++m) { char* pCol = new char[nRow * CRDBCOL_BUFFERSIZE]; for(int i = 0; i < nRow; i++) { char* pCurVal = pCol + (i*CRDBCOL_BUFFERSIZE); wcstombs(pCurVal, strXXX /* some value relvant to applicatoin*/, CRDBCOL_BUFFERSIZE); } retcode = SQLBindCol(hstmt, m, SQL_C_CHAR, pCol, CRDBCOL_BUFFERSIZE * sizeof(char), &pSize[(m-1) * nRow]); } retcode = SQLExecDirect( hstmt, (wchar_t*)sqlString.c_str(), SQL_NTS) ;
retcode = SQLBulkOperations( hstmt, SQL_ADD ); Received on Fri Aug 01 2003 - 08:40:36 CDT
![]() |
![]() |