Using Rowset Binding
To use column-wise binding
-
For each bound column
-
Allocate an array of R (or more) column buffers to store data values.
-
Allocate an array of R (or more) column buffers to store data lengths.
-
Call SQLBindCol to bind the column's data value and data length arrays to the column of the rowset.
-
Call SQLSetStmtOption with an fOption of SQL_BIND_TYPE and a vParam of SQL_BIND_BY_COLUMN to use column-wise binding.
To use row-wise binding
-
Allocate an array of R (or more) row buffers. Each row buffer should contain C data value buffers and C data length elements.
-
For each bound column
-
Call SQLBindCol to bind the column's data value and data length buffers (within the array of row buffers) to the column of the rowset.
-
Call SQLSetStmtOption with an fOption of SQL_BIND_TYPE and a vParam of the size of a single row element to use row-wise binding.