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!
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!