2 Replies Latest reply on Mar 12, 2012 10:10 AM by 922753

    Error in Bulk(Batch) Insert

    887243
      Hi,

      We are facing problem while doing bulk (batch) insert using oracleinstant client 10.2.0.4 unixodbc 2.3.1 and oracle 10g on (Linux) RHEL 5.4 (x86-64).

      Error message is as follows: Handletype = 3 - OutputState = HY000 - Native Error Code = 01461 - ODBC Error Message = [Oracle][ODBC][Ora]ORA-01461: can bind a LONG value only for insert into a LONG Column.

      Here is quick snapshot of the api called

      To Initialize recordset function call are:
      OCIHandleAlloc
      QLAllocHandle
      SQLSetStmtAttr

      The required statement attribute is set using
      SQLSetStmtAttr = SQL_ATTR_PARAM_STATUS_PTR
      SQLSetStmtAttr = SQL_ATTR_PARAMS_PROCESSED_PTR
      SQLPrepare
      SQLDescribeParam

      row wise binding is done using
      SQLBindParameter
      AutoCommit is set false
      SQLSetConnectAttr = SQL_ATTR_AUTOCOMMIT
      SQLSetStmtAttr = SQL_ATTR_PARAMSET_SIZE
      SQLExecute

      to Commit transaction SQLEndTran api is called.
      Data insert is valid but when execute is called it fails with the above error.

      Regards,

      Nithesh