Sybase JConnect: ENABLE_BULK_LOAD usage

前端 未结 5 2107
野的像风
野的像风 2020-12-16 08:10

Can anyone out there provide an example of bulk inserts via JConnect (with ENABLE_BULK_LOAD) to Sybase ASE?

I\'ve scoured the internet and found nothing

5条回答
  •  攒了一身酷
    2020-12-16 08:41

    In order to get the sample provided by Chris Kannon working, do not forget to disable auto commit mode first:

    dbConn.setAutoCommit(false);
    

    And place the following line before dbConn.commit():

    pstmt.executeBatch();
    

    Otherwise this technique will only slowdown the insertion.

提交回复
热议问题