In oracle a procedure call with an in, inout and out parameter would be something as:
query->prepare("begin myProcedure(?,?,?) end;");
query->bindValue(0, "foo", QSql::In);
query->bindValue(1, 1234, QSql::InOut);
query->bindValue(2, 0, QSql::Out);
query->exec();
QString p2
= query
->boundValue
(1).
toString();
int p3 = query->boundValue(2).toInt();
query->prepare("begin myProcedure(?,?,?) end;");
query->bindValue(0, "foo", QSql::In);
query->bindValue(1, 1234, QSql::InOut);
query->bindValue(2, 0, QSql::Out);
query->exec();
QString p2 = query->boundValue(1).toString();
int p3 = query->boundValue(2).toInt();
To copy to clipboard, switch view to plain text mode
I'm not sure about MySQL, but I think the query syntax would instead be:
query->prepare("call myProcedure(?,?,?);");
query->prepare("call myProcedure(?,?,?);");
To copy to clipboard, switch view to plain text mode
Bookmarks