Unsolved instead of writing queries for inserting ,update ,edit,and delete, i want to write a stored procedure in qt application?
-
Instead of writing queries for inserting ,update ,edit,and delete, i want to write a stored procedure in qt application using qt5 in Ubuntu 16 and MS SQL server....
-
@veera SQL stored procedures are not related to Qt. Take a look at MS SQL Server documentation to see how to write them.
-
okay...how should i call stored procedure in qt application....
-
QSqlQuery query(db); query.setForwardOnly(true); query.prepare("{CALL myStoredProc(:myarg) }"); query.bindValue(":myarg", 1234); if (query.exec()){ }
see "Binding values to a stored procedure:" section of http://doc.qt.io/qt-5/qsqlquery.html#approaches-to-binding-values
-
okay i will try thank u so much @VRonin .....