Problems with stored procedure using the mysql-native library.
TheFlyingFiddle via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jan 18 11:40:12 PST 2017
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?
More information about the Digitalmars-d-learn
mailing list