|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SqlServer ntext truncatedI am inserting data into an ntext column in SqlServer 2000 but it is being truncated. In every StackTrace and Steps column (the only 2 ntext columns) I am seeing the text truncated to about 255 chars. Can anyone tell me why this is, and maybe how to solve the problem? Thanks Pete InsertLogCommand = Connection.CreateCommand(); InsertLogCommand.CommandText = "Insert into ErrorLog (DataFromPPC, DateTime, Description, Steps, StackTrace) values (@DataFromPPC, @DateTime, @Description, @Steps, @StackTrace)"; parameter = new SqlParameter(); parameter.ParameterName = "@DataFromPPC"; parameter.SqlDbType = System.Data.SqlDbType.Int; InsertLogCommand.Parameters.Add(parameter); parameter = new SqlParameter(); parameter.ParameterName = "@DateTime"; parameter.SqlDbType = System.Data.SqlDbType.DateTime; InsertLogCommand.Parameters.Add(parameter); parameter = new SqlParameter(); parameter.ParameterName = "@Description"; parameter.SqlDbType = System.Data.SqlDbType.VarChar; InsertLogCommand.Parameters.Add(parameter); parameter = new SqlParameter(); parameter.ParameterName = "@Steps"; parameter.SqlDbType = System.Data.SqlDbType.VarChar; InsertLogCommand.Parameters.Add(parameter); parameter = new SqlParameter(); parameter.ParameterName = "@StackTrace"; parameter.SqlDbType = System.Data.SqlDbType.VarChar; InsertLogCommand.Parameters.Add(parameter); while ...... { InsertLogCommand.Parameters["@DateTime"].Value = logDateTime; InsertLogCommand.Parameters["@DataFromPPC"].Value = archiveID; InsertLogCommand.Parameters["@Description"].Value = description; InsertLogCommand.Parameters["@Steps"].Value = steps; InsertLogCommand.Parameters["@StackTrace"].Value = stackTrace; InsertLogCommand.ExecuteNonQuery(); } It would appear that all of the data is there, but when I use SQL query
analyzer and then doing ctrl+A / ctrl+C to copy the columns contents does not get all of the data. How can I view the entire contents in the query analyzer? Thanks Pete Peter Morris wrote:
> It would appear that all of the data is there, but when I use SQL Query Analyzer has a built-in limit to the max number of text it will bring > query analyzer and then doing ctrl+A / ctrl+C to copy the columns > contents does not get all of the data. How can I view the entire > contents in the query analyzer? back in a query. If you hunt around in the Options dialog you will find it. I believe the default is around 2k.
Other interesting topics
Refresh not working on TableAdapter
Password protect .mdb file A search module in c# How can I use connected mode instead of disconnected? Get PK back on an insert into Oracle Data Addaptor Not updating database?? Can some on tell me what i am missing please. Linefeed in Datacolumn.Expression I need an approach to storing/editing data amongs forms Small problem with storing connection strings DataGridView and Combobox columns |
|||||||||||||||||||||||