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";
sqlCommand.Parameters.Add( "SomeString", SqlDbType.VarChar).Value = "Some
text";
sqlCommand.Parameters.Add("Data", SqlDbType.Image).Direction =
System.Data.ParameterDirection.Output;
sqlCommand.Parameters["Data"].Size = 100000;
sqlCommand.ExecuteNonQuery();

regards
Mark