Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
<binding name="BasicHttpBinding_IPortalAPI" closetimeout="00:01:00" opentimeout="00:01:00" receivetimeout="00:10:00" sendtimeout="00:01:00" bypassproxyonlocal="false" hostnamecomparisonmode="StrongWildcard" maxbufferpoolsize="524288" maxreceivedmessagesize="2000000" messageencoding="Text" textencoding="utf-8" usedefaultwebproxy="true" allowcookies="false"><br />
          <readerquotas maxdepth="32" maxstringcontentlength="2000000" maxarraylength="16384" maxbytesperread="4096" maxnametablecharcount="16384" />


I have increase the size of maxReceivedMessageSized =2000000 to 200000000

during saving the data it showingh exception

System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated.<br />
The data for table-valued parameter "@WISR_DATA" doesn't conform to the table type of the parameter.<br />
The statement has been terminated.<br />
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)<br />
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)<br />
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()<br />
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)<br />
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)<br />
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)<br />
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)<br />
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)</binding>
Posted
Updated 21-Jun-13 0:55am
v4

1 solution

I guess this error is not at service layer but at database layer. Check the size of the variable @WISR_DATA and the table where you are trying to save. one of it might have the capacity less than the size of the data. Hope this gives you clue where to look at.
 
Share this answer
 
v2
Comments
mahinder.singh.chauhan 21-Jun-13 7:03am    
sir i have taken data table so i don't know what is the lenght of datatable how can i resolve this error any suggesstion
ArunRajendra 21-Jun-13 7:26am    
You should be able to get this from the Databas schema.
mahinder.singh.chauhan 21-Jun-13 9:05am    
Sir in database i have taken User-defined table type how can i reslove this or need to change please help me out thanks in advance
ArunRajendra 21-Jun-13 13:44pm    
if you have access to database use sp_help tablename to show the fields and its length.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900