Skip navigation
Currently Being Moderated

Getting SQLException ,I Expect BatchUpdate Exception

Posted by vgss on Aug 23, 2010 1:33:47 PM

Hi,

  following is my code, I am using netezza JDBC driver 5.0.10,this  driver support BATCH UPDATES, so with the following code i should get BatchUpdateException but I am getting SQLException would any  one please help me.I am first time working with Netezza

 

                             

                             

                                                      try{

                                                                     for(String dBstat: DbStatments)

                                                                    {

                                                                            statement.addBatch(dBstat);

                                                                    }

                                                                   noOfRecordsUpdated=statement.executeBatch();

                                                              

 

 

 

 

                                                         }

                                                         catch(BatchUpdateException  bue)

                                                        {

                                                               logger.error(bue.getMessage());

                                                        }

 

 

 

                                                       catch(SQLException sql)

                                                       {

                                                               logger.error(sql.exception);

                                                      }

 

 

Comments (0)