Stored Procedure with Image Output  
Author Message
DanielKuhn





PostPosted: Top

SQL Server Developer >> Stored Procedure with Image Output

Hi!

I'm trying to get image in a parameter (this parameter is declared as
'output') from stored procedure, but it causes an exception: "A severe error
occurred in the current command". (Which errors?? ;-)). When I've changed
'image output' to 'varchar output' everything was fine. When image parameter
is only input to the procedure it seems to be ok. But unfortunately I need
this parameter to be declared as 'image output'. What am I doing wrong?

I'm using stored procedure declared as:

CREATE PROCEDURE ProcName
@SomeString varchar(255),
@Data image OUTPUT
AS
...

and it is called from C# program:

sqlCommand.CommandType = System.Data.CommandType.StoredProcedure;
sqlCommand.CommandText = "ProcName";

text";

System.Data.ParameterDirection.Output;

sqlCommand.ExecuteNonQuery();

regards
Mark

SQL Server25