I'm calling a stored procedure on SQL Server that has output parameters. The way we have been handling it is declaring variables in the query and then a select statement like this:
var result = qie.doQuery('ServerExample', "DECLARE @p1 varchar(255); EXEC OutputVarChar @p1 output; SELECT @p1 as N'vchOutput';");
I prefer to use parameterized queries instead, but I'm not sure how it should work. I tried using "\@p1" to escape the at sign so it isn't interpretted as a parameter but I get the error that it's a bad escapement. Is there a way to get the output parameter to work or is it not compatible?