Home > Net >  Xamarin SQL to add data via the webservice error
Xamarin SQL to add data via the webservice error

Time:03-25

 System. Web. Services. Separate Protocols. SoapException 
Message=System. Web. Services. Separate Protocols. SoapException: the server cannot process the request, - & gt; System. The Data. SqlClient. SqlException: when IDENTITY_INSERT is set to OFF, cannot insert for the identity column in the table 'Companies' explicit values,
In the System. The Data. SqlClient. SqlConnection. one rror (SqlException exception, Boolean breakConnection, Action ` 1 wrapCloseInAction)
In the System. The Data. SqlClient. TdsParser. ThrowExceptionAndWarning (TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
In the System. The Data. SqlClient. TdsParser. TryRun (RunBehavior RunBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& DataReady)
In the System. The Data. SqlClient. SqlCommand. FinishExecuteReader (SqlDataReader ds, RunBehavior RunBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
In the System. The Data. SqlClient. SqlCommand. RunExecuteReaderTds (CommandBehavior cmdBehavior, RunBehavior RunBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& Task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
In the System. The 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)
In the System. The Data. SqlClient. SqlCommand. InternalExecuteNonQuery (TaskCompletionSource ` 1 completion String methodName, Boolean sendToPipe, Int32 timeout, Boolean& UsedCache, Boolean asyncWrite, Boolean inRetry)
In the System. The Data. SqlClient. SqlCommand. ExecuteNonQuery ()
In WebForAndroid. WebService1. InsertData (Int32 id, String name) location C: \ Users \ \ Administrator \ source \ repos \ WebForAndroid \ WebForAndroid \ AndroidService asmx. Cs: line number 52
- at the end of the inner exception stack trace -- -- --

What is the problem online try to find a solution or not goozyet
Enclosed find the solution

CodePudding user response:

https://blog.csdn.net/cuiyaoqiang/article/details/47004895
  •  Tags:  
  • C#
  • Related