-2

I want to pass an array of CStrings to a stored procedure. And how can use the array by its indexes? The best case can be sending an array with a dynamic length. But I can work with a fixed length array. I need a C++ sample for calling this stored procedure also.

2

1 Answer 1

1

Here's one person's solution: https://stackoverflow.com/questions/24278060/sql-server-table-valued-parameters-in-c-oledb-client

Stored procedures use tables not arrays. A table has no implicit ordering nor anything that corresponds to an array index. All rows are treated as a single set. SQL statements address the entire set of rows, or a specified subset. Whatever you need to achieve by itterating through the array will be better done set-wise once inside the SP.

Not the answer you're looking for? Browse other questions tagged or ask your own question.