code_junkie

Can I return a varchar(max) from a stored procedure?

Nov 11th, 2011
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. objOutParam1 = objCommand.Parameters.Add("@RStr", OleDbType.varchar)
  2. objOutParam1.Size = 8000
  3. objOutParam1.Direction = ParameterDirection.Output
  4.  
  5. SqlParameter p = new SqlParameter("@RStr", SqlDbType.VarChar);
  6. p.Direction = ParameterDirection.Output;
  7.  
  8. objOutParam1.Size = Int32.MaxValue;
  9.  
  10. param.Size = int.MaxValue;
  11. param.SqlDbType = SqlDbType.VarBinary;
Add Comment
Please, Sign In to add comment