Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

Connector/C++ 8.0 Get Output Parameter (1 reply)

$
0
0
I have a stored procedure I call which inserts a new record into database, this stored procedure has an output parameter that I use to get the new auto_increment id of the record.

I'm trying to use the following to retrieve the output parameter's value, but this is from the documentation for MySQL Connector 1.1, I using 8.0. Is this the correct way?

It actually works but the SqlResult has a single column without a column name (column name is blank). So if I use two output params I'm not sure how to retrieve them by name?

mysqlx::SqlStatement sql = sqlSession.sql("SELECT @p_table1_id AS _table1_id");

mysqlx::SqlResult sqlResult = sql.execute();

Thanks!

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>