Could any one can help me solving this problem...i am using addBatchs ...
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Option type out of range
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLSetStmtAttr(JdbcOdbc.java:5251)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setStmtParameterSize(JdbcOdbcPreparedStatement.java:1866)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeBatchUpdate(JdbcOdbcPreparedStatement.java:1644)
at sun.jdbc.odbc.JdbcOdbcStatement.executeBatch(JdbcOdbcStatement.java:912)
at com.dms.data.PrimaryUpload.insertPrimaryUploadDetails(PrimaryUpload.java:418)
at com.dms.action.PrimaryUploadDetails.execute(PrimaryUploadDetails.java:188)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Option type out of range
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLSetStmtAttr(JdbcOdbc.java:5251)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setStmtParameterSize(JdbcOdbcPreparedStatement.java:1866)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeBatchUpdate(JdbcOdbcPreparedStatement.java:1644)
at sun.jdbc.odbc.JdbcOdbcStatement.executeBatch(JdbcOdbcStatement.java:912)
and the code is ----------------->
Set keyss=invoiceItemDetails.keySet();
statement3=connection.prepareStatement("insert into TRANSMASTER(INVOICENO,INVOICEDATE,QUANTITY,SOLDBY,SOLDTO,TRANSNO,ITEMCODE,SEQID,CIRCLEID,TRANSDATE) values (?,?,?,?,?,?,?,?,?,sysdate)");
for(Iterator iterator=keyss.iterator();iterator.hasNext();){
String key = (String) iterator.next();
ArrayList keyValues=new ArrayList();
keyValues=(ArrayList)invoiceItemDetails.get(key);
Set setValues=new HashSet();
for(int k=0;k<keyValues.size();k++){
setValues.add((String)keyValues.get(k));
}
for(int m=0;m<keyValues.size();m++){
int valueCount=0;
if(setValues.contains(keyValues.get(m))){
valueCount++;
}
itemCount.put(keyValues.get(m),valueCount+"");
}
Set itemskeys=itemCount.keySet();
for(Iterator iterator1=itemskeys.iterator();iterator1.hasNext();){
String itemKey= (String) iterator1.next();
statement3.setString(1, key);
statement3.setString(2,(String)invoiceNumberInvDate.get(key));
statement3.setInt(3,Integer.parseInt((String)itemCount.get(itemKey)));
statement3.setString(4,"AIRCEL");
statement3.setString(5,"DISTRIBUTOR");
statement3.setInt(6,maxTrans);
statement3.setString(7,itemKey);
statement3.setInt(8,1);
statement3.setString(9,circleId);
//statement3.executeUpdate();
statement3.addBatch();
}
}
>