http://www.brentozar.com/archive/2009/09/whats-on-my-bookshelf/
SQLPrepare (hstmt, "INSERT INTO DailyLedger (...)" + "VALUES (?,?,...)", SQL_NTS); SQLSetStmtAttr (hstmt, SQL_ATTR_PARAMSET_SIZE, (UDWORD)100, SQL_IS_UINTEGER); SQLSetStmtAttr (hstmt, SQL_ATTR_PARAMS_PROCESSED_PTR, &rows_processed, SQL_IS_POINTER); /* Specify an array in which to retrieve the status of each set of parameters. */ SQLSetStmtAttr(hstmt, SQL_ATTR_PARAM_STATUS_PTR, ParamStatusArray, SQL_IS_POINTER); /* Pass 100 parameters per execute */ /* Bind parameters */ ... do { /* Read up to 100 ledger values into bound parameter buffers */ ... rc = SQLExecute (hstmt); /* Insert a group of 100 rows */ } while ! (eof);













