MySQL Forums
Forum List  »  Connector/C++

Connector/C++ 8.0 Get Output Parameter
Posted by: Zachary Graham
Date: March 11, 2020 06:52AM

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!

Options: ReplyQuote


Subject
Views
Written By
Posted
Connector/C++ 8.0 Get Output Parameter
916
March 11, 2020 06:52AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.