Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
<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">
<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.
The data for table-valued parameter "@WISR_DATA" doesn't conform to the table type of the parameter.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)</binding>
Posted 21-Jun-13 1:52am
Edited 21-Jun-13 1:55am
v4

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
v2
Comments
mahinder.singh.chauhan at 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 at 21-Jun-13 7:26am
   
You should be able to get this from the Databas schema.
mahinder.singh.chauhan at 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 at 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)

  Print Answers RSS
0 OriginalGriff 406
1 Marcin Kozub 225
2 Sergey Alexandrovich Kryukov 205
3 Raul Iloc 170
4 Maciej Los 164
0 OriginalGriff 8,289
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,624
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 21 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100