I am inserting stack trace of exception into table.But When I execute select query for that table from sql query analyzer then I dont see complete stack trace in it.
Here is the code..
DataAccess.ExecuteNonQuery(
conn,
"usp_insert_error_detail",
iproductType,
"error",
ex.Message.ToString(),
ex.StackTrace.ToString());
Given that you said the data type for the stack trace is NVARCHAR(200), this is likely not sufficient. You need to make it much bigger, since stack traces can easily exceed 200 characters. You could make it NVARCHAR(MAX), which indicates that the maximum storage size is 2^31-1 bytes. The storage size, in bytes, is two times the number of characters entered + 2 bytes.
Thanks to JSR for the correction, I didn’t realize varchar(max) was introduced in SQL 2005.