How do you extract or insert rows in batches using ODBC? (in C or C ++)

I'm trying to figure out which ODBC functions to call and how to call them to retrieve rows in batches or insert rows into packages (inserts that use bind variables, not just an array of insert statements).

I can get one line at a time by calling these functions in order

SQLBindParameter
SQLExecute
SQLFetch

Also, if I do inserts / updates, I can do one line at a time by calling these functions

SQLBindParameter
SQLExecute

I do not know what I need to change in these calls in order to:

1) Extract lines in batches, for example. 150 rows per batch
2) Insert a few rows into a SQLExcecute call, for example. 150 lines per call

( , ODBC .. /, ), , , . ,

+5

All Articles