G
Guest
I want to use a datareader to execute a stored procedure and records from a table. I want to trap any possible errors in the stored procedure and return the error message via an output parameter. But, the output parameter is empty (nothing!) any time after I execute a query
For example, say I have the stored procedur
CREATE PROCEDURE sp_Some_Pro
@OutMsg varchar(200) = '' OUTPU
A
SET @OutMsg = 'test
RETUR
I do the following in my code after the ExecuteReader statement
sOutMsg = CType(arParms(0).Value, String
and sOutMsg is "test". But when the stored procedure has a select statement in it lik
CREATE PROCEDURE sp_Some_Pro
@OutMsg varchar(200) = '' OUTPU
A
SELECT * FROM AnyTabl
SET @OutMsg = 'test
RETUR
I get sOutMsg equal to nothing
I also got the same result when I tried to use just straight ADO instead of ADO.NET
Has anyone seen this before
For example, say I have the stored procedur
CREATE PROCEDURE sp_Some_Pro
@OutMsg varchar(200) = '' OUTPU
A
SET @OutMsg = 'test
RETUR
I do the following in my code after the ExecuteReader statement
sOutMsg = CType(arParms(0).Value, String
and sOutMsg is "test". But when the stored procedure has a select statement in it lik
CREATE PROCEDURE sp_Some_Pro
@OutMsg varchar(200) = '' OUTPU
A
SELECT * FROM AnyTabl
SET @OutMsg = 'test
RETUR
I get sOutMsg equal to nothing
I also got the same result when I tried to use just straight ADO instead of ADO.NET
Has anyone seen this before