P
Peter Morris
Hi all
I 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();
}
I 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();
}