System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated.
2018-02-27 07:31
661 查看
insert into Ftp_File (trx_id,file_path,file_name,form_id,status,create_by,create_time) values(@trx_id,@file_path,@file_name,@form_id,@status,@create_by,@create_time)T18022707130325_pd100,ftp://127.0.0.1/FastFlow/Flow/180227071214iq,t992.jpg,180227071214iq,New,pd100,2018/2/27 7:13:03, [2018-02-27 07:13:03,606] 7 -- INFO -- LogHelper [WriteLog] -- System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated. The statement has been terminated. 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) 在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) 在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() 在 MsSql.ExecInsertParaTrans(String sql, SqlParameter[] paras) 位置 c:\QMSoft\FastFlow\FastFlow\App_Code\Tools\MsSql.cs:行号 310 ClientConnectionId:2c2accde-ec5d-4f25-84db-a578f09a9609这个问题出现原因是因为数据库中的trx_id的长度小,但是插入数据比较找到trx_id字段,修改表结构,使表字段大小相同或大于要插入的数据
相关文章推荐
- [Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated.
- SharePoint "System.Data.SqlClient.SqlException (0x80131904): Parameter '@someColumn' was supplied multiple times.“
- Error: String or binary data would be truncated. The statement has been terminated
- System.Data.SqlClient.SqlException (0x80131904): Timeout 时间已到
- Server Job: error: String or binary data would be truncated. The statement has been terminated.
- String or binary data would be truncated 解决办法
- String or binary data would be truncated 异常解决办法
- String or binary data would be truncated
- 问题:String or binary data would be truncated
- String or binary data would be truncated. The statement has been terminated.
- String or binary data would be truncated 异常解决办法 .
- String or binary data would be truncated.解决方法
- JAVA: String or binary data would be truncated 异常解决办法
- String or binary data would be truncated 异常解决办法
- String or binary data would be truncated[解决方案]
- sql server 2008 System.Data.SqlClient.SqlException (0x80131904): 查询处理器未能为执行并行查询启动必要的线程资源 处理方法
- String or binary data would be truncated
- System.Data.SqlClient.SqlException (0x80131904): EXECUTE 后的事务计数指示 BEGIN 和 COMMIT 语句的数目不匹配。上一计数 = 1,当前计数 = 0。 EXECUTE 后的事务计数指示 BEGIN 和 COMMIT 语句的数目不匹配。上一计数 = 1,当前计数 = 0。
- System.Data.SqlClient.SqlException (0x80131904): 查询已取消,因为此查询的估计开销(302)超出了配置的阈值 300
- 'String or binary data would be truncated' error message