qt怎么获取存储过程的返回值?
存储过程:
- SQL code
ALTER proc [dbo].[sp_test]@a intasbegin select * from Categories where CategoryID = @a select @a;end
用query执行存储过程后query.value(0)返回的是空。
[解决办法]
你的存储过程里面有2个select语句,试试bool QSqlQuery::nextResult ()获取第二个select的结果。
[解决办法]
你的问题本身就是答案了呢
[解决办法]