<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span><span>Hi,</span></div><div><span></span> </div><div><span>the below problems exist only when we read data from a file and then call bulk insert for that data.</span></div><div><span></span> </div><div><span>If we comment file reading and hard code the values, everything works fine.</span></div><div><span></span> </div><div>Kindly revert for any suggestion.</div><div> </div><div>Regards,</div><div> </div><div>Nithesh<br></div></span><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <div style="margin: 5px 0px; padding: 0px; border: 1px solid rgb(204, 204, 204); height: 0px; line-height: 0; font-size: 0px;" class="hr" contentEditable="false"
 readonly="true"></div>  <b><span style="font-weight: bold;">From:</span></b> Nithesh Shetty &lt;knitheshshetty@yahoo.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> "unixodbc-support@mailman.unixodbc.org" &lt;unixodbc-support@mailman.unixodbc.org&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, March 1, 2012 9:37 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Error in BulkInsert<br> </font> </div> <br>
<div id="yiv2024949292"><div><div style="color: rgb(0, 0, 0); font-family: times new roman, new york, times, serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><div><var id="yiv2024949292yui-ie-cursor"></var>Hi,</div><div>&nbsp;</div><div>We are facing problem while doing bulk insert using oracleinstant client 10.2.0.4 unixodbc 2.3.1 and oracle 10g.</div><div>&nbsp;</div><div>Error message is as follows:</div><div><span class="yiv2024949292tab">&nbsp;</span></div><div><span class="yiv2024949292tab">Handletype = 3 - OutputState&nbsp;= HY00 - Native Error Code = 1461 - ODBC Error Message = [Oracle][ODBC][Ora]ORA-01461: can bind a LONG value only for insert into a LONG Column.</span></div><div><span class="yiv2024949292tab"></span>&nbsp;</div><div><span class="yiv2024949292tab">Here is quick snapshot of the api called</span></div><div><span class="yiv2024949292tab"></span>&nbsp;</div><div><span class="yiv2024949292tab">To Initialize recordset
 function call are:</span></div><div><span class="yiv2024949292tab">OCIHandleAlloc</span></div><div><span class="yiv2024949292tab">SQLAllocHandle</span></div><div><span class="yiv2024949292tab">SQLSetStmtAttr </span></div><div><span class="yiv2024949292tab"></span>&nbsp;</div><div><span class="yiv2024949292tab">The required statement attribute is set using</span></div><div><span class="yiv2024949292tab"></span>&nbsp;</div><div><span class="yiv2024949292tab">SQLSetStmtAttr = SQL_ATTR_PARAM_STATUS_PTR</span></div><div><span class="yiv2024949292tab">SQLSetStmtAttr = SQL_ATTR_PARAMS_PROCESSED_PTR</span></div><div><span class="yiv2024949292tab"></span>&nbsp;</div><div><span class="yiv2024949292tab">SQLPrepare</span></div><div><span class="yiv2024949292tab"></span>&nbsp;</div><div><span class="yiv2024949292tab">SQLDesribeParam</span></div><div><span class="yiv2024949292tab"></span>&nbsp;</div><div><span class="yiv2024949292tab">row wise binding is done using
 </span></div><div><span class="yiv2024949292tab">SQLBindParameter</span></div><div><span class="yiv2024949292tab"></span>&nbsp;</div><div><span class="yiv2024949292tab">AutoCommit is set false</span></div><div><span class="yiv2024949292tab">SQLSetConnectAttr&nbsp; = SQL_ATTR_AUTOCOMMIT</span></div><div><span class="yiv2024949292tab"></span>&nbsp;</div><div><span class="yiv2024949292tab">SQLSetStmtAttr<span class="yiv2024949292tab">&nbsp;&nbsp;&nbsp;&nbsp;= SQL_ATTR_PARAMSET_SIZE</span></span></div><div><span class="yiv2024949292tab"><span class="yiv2024949292tab"></span></span>&nbsp;</div><div><span class="yiv2024949292tab"><span class="yiv2024949292tab">SQLExecute</span></span></div><div><span class="yiv2024949292tab"><span class="yiv2024949292tab"></span></span>&nbsp;</div><div><span class="yiv2024949292tab"><span class="yiv2024949292tab">to Commit transaction &nbsp;SQLEndTran api is called.</span></span></div><div><span class="yiv2024949292tab"><span
 class="yiv2024949292tab"></span></span>&nbsp;</div><div><span class="yiv2024949292tab"><span class="yiv2024949292tab">Data insert is valid but when execute is called it fails with the above error.</span></span></div><div><span class="yiv2024949292tab"><span class="yiv2024949292tab"></span></span>&nbsp;</div><div><span class="yiv2024949292tab"><span class="yiv2024949292tab">Regards,</span></span></div><div><span class="yiv2024949292tab"><span class="yiv2024949292tab"></span></span>&nbsp;</div><div><span class="yiv2024949292tab"><span class="yiv2024949292tab">Nithesh</span></span></div><div><span class="yiv2024949292tab"><span class="yiv2024949292tab"></span></span>&nbsp;</div><div><span class="yiv2024949292tab"><span class="yiv2024949292tab"></span></span>&nbsp;</div><div><span class="yiv2024949292tab"></span>&nbsp;</div></div></div></div><br><br> </div> </div>  </div></body></html>