Hi

I am having problems using stored procedures that return results.

Example procedure:
CREATE PROCEDURE GetUsers()
  SELECT * FROM users;

When I use this procedure from the MySQL command line everything works fine. However, when I use it from the mysql-native library i get into problems.

int main()
{
   auto con = new Connection(...); //
   auto cmd = Command(con);
   cmd.execProcedure("GetUsers");
}

This returns the error:
MySQL error: PROCEDURE db.getusers can't return a result set in the given context.

Other SQL queries work fine over the connection and procedure calls that do not return anything also works.

How would i go about solving this problem?

Reply via email to