Bulk Insert Support for ODBC Data Batching

The ODBC data batching without binding parameter arrays feature introduced in 15.7 release has now been extended to support inserting batches using bulk insert protocol.

To enable, set the EnableBulkLoad connection property to the desired bulk insert level (1, 2, or 3), and the HomogeneousBatch connection property to 2. See Adaptive Server Enterprise ODBC Driver by Sybase Users Guide.

For example, add ;enablebulkload=3;homogeneousbatch=2 in the connection string and simple insert statements executed in a batch are converted to fast-logged bulk insert statements.

Alternatively, set the connection properties programmatically using the SQL_ATTR_HOMOGENEOUS_BATCH and SQL_ATTR_ENABLE_BULK_LOAD connection attributes to achieve the same result:
sr = SQLSetConnectAttr(hdbc, SQL_ATTR_HOMOGENEOUS_BATCH, (SQLPOINTER)2, SQL_IS_INTEGER);
sr = SQLSetConnectAttr(hdbc, 
SQL_ATTR_ENABLE_BULK_LOAD, (SQLPOINTER)3, SQL_IS_INTEGER);