lexicalunit/nanodbc — pull request #4 by WimObiwan (2013-08-21 12:44:54+00:00)
Title: Feature: Support for retrieving output/return parameters when calling stored procedure

...dures. You need to retrieve all returned result sets before the output parameters are filled in (using next_result(), provided by separate commit).

Example:
nanodbc::statement stmt(conn);
stmt.prepare(conn, "{? = CALL dbo.spMyProc(?,?,?)}");
stmt.bind_parameter(0, &result, NULL, nanodbc::statement::Return);
stmt.bind_parameter(1, str.c_str());
stmt.bind_parameter(2, &i);
stmt.bind_parameter(3, &j, nanodbc::statement::Out);
nanodbc::result resultset = stmt.execute();
while (resultset.next_result()) ;
conn.disconnect();