With ADO, using SqlDataAdapter.FillSchema clears @ReturnValues and other stored procedure parameters marked for output
问题 [Edit - an explanation of the answer is at the foot of the question because the subtlety is not totally obvious from the accepted answer.] Original question: I am looking for a quick 'yes this approach should be possible' answer before I commit further effort. Scenario: I have a simple SQL Server stored procedure that runs a query. I also want to (1) return a varchar(100) parameter declared as OUTPUT , and (2) use the @ReturnValue to return a further (integer) value. I call this procedure