title: MySQL C++ Connector always outputs the same string
body: <p>I am trying to write a program to output a row from a MYSQL table and it always outputs the same thing...
  The function takes input from another function</p>
  
  <p>C++</p>
  
  <pre><code>try {
      sql::Driver *driver;
      sql::Connection *con;
      sql::Statement *stmt;
      sql::ResultSet *res;
  
  /* Create a connection */
  driver = get_driver_instance();
  con = driver-&gt;connect("tcp://127.0.0.1:3306", "root", "TSA!");
  /* Connect to the MySQL test database */
  con-&gt;setSchema("main");
  
  stmt = con-&gt;createStatement();
  stmt-&gt;execute("CALL getData('" + quest1 +"', @ans)");
  res = stmt-&gt;executeQuery("SELECT @ans AS _message");
  while (res-&gt;next()) {
      cout &lt;&lt; "Answer: ";
      /* Access column data by alias or column name */
      cout &lt;&lt; res-&gt;getString("_message") &lt;&lt; endl;
  }
  delete res;
  delete stmt;
  delete con;
  }
  </code></pre>
  
  <p>and then a error statement which is not triggered by this program.</p>
  
  <p>MySQL</p>
  
  <pre><code>   CREATE DEFINER=`root`@`localhost` PROCEDURE `getData`(IN info MEDIUMTEXT,
  OUT datas MEDIUMTEXT)
  BEGIN
      SELECT `answer` from `approved` WHERE `Question` = info into datas;
  END
  </code></pre>
  
  <p>The table:
  question | answer
  test | test
  test2 | test2</p>
  
  <p>The program always and only outputs "test"
  How do I fix this?</p>