QSqlQuery movementQuery ;
movementQuery.prepare("call Qt.add_movement(:pDocumentType , :pDocumentId ,
to_date(sysdate,'dd-mm-yyyy') ,:pDocumentNumber"
",to_date(sysdate,'dd-mm-yyyy') , :pCustId ,:pMovementId ,:pReturn)");
movementQuery.bindValue(":pDocumentType",documentType);
movementQuery.bindValue(":pDocumentId",documentId);
movementQuery.bindValue(":pDocumentNumber",0);
movementQuery.bindValue(":pCustId",ui->custId->text());
movementQuery.bindValue(":pMovementId", 0, QSql::Out);
movementQuery.bindValue(":pReturn", "FALSE", QSql::Out);
movementQuery.exec();
The query executed the query is active and no errors are valid
message is method to display the value
message(query.boundValue(":pReturn").toString());
message(query.boundValue(5).toString());
message(query.boundValue(":pMovementId").toString());
message(query.boundValue(4).toString());
任何想法 感谢您感兴趣
+1
您正在执行'movementQuery'并返回'query'的绑定值。这只是你在设置问题时犯的一个错误吗?另外,Oracle中的Out参数的类型是什么? –
+0
非常感谢您这是真正的问题 –
+1
@TimMeyer - 您的评论似乎已经解决了OP的问题:或许您应该将其作为答案发布,因此可以以适当的SO方式最终确定问题。 –