title: System.Web.Services.Protocols.SoapException
body: <p>This error is generated in a ratio of 5:1.  4 times it will work without error, but the next time it runs it will return the error "Object reference not set to an instance of an object" for the same query string.</p>
  
  <p>My system uses a web service (SVC) to connect to a MySql database for all of its CRUD operations. The Error is listed below:</p>
  
  <blockquote>
    <p>System.Web.Services.Protocols.SoapException: DELETE FROM
    customer_number WHERE cus_id =4 Object reference not set to an
    instance of an object. at
    System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
    message, WebResponse response, Stream responseStream, Boolean
    asyncCall)    at
    System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
    methodName, Object[] parameters) at 
    POS.ThePOSServerService.PosMain.ExecuteQueryBool(String strQuery,
    String Company, String User, String Pass) in Reference.vb:line 266</p>
  </blockquote>
  
  <p>While the code that generates error is as follows with line numbers:
  <code>
      Try
      261  Dim ConnectionString As String = _ 
             ConfigurationManager.ConnectionStrings(Company).ConnectionString
      262  'Dim sCommand As StringBuilder = New 262 - StringBuilder(strQuery)
      263  Using mConnection As MySqlConnection = New MySqlConnection(ConnectionString)
      264      mConnection.Open()
      265      Using myCmd As MySqlCommand = New MySqlCommand(strQuery, mConnection)
      266          myCmd.CommandType = CommandType.Text
      267          Result = myCmd.ExecuteNonQuery() > 0
      268      End Using
      269  End Using</code>
      Catch ex As Exception
          Throw New ApplicationException(ex.ToString)
      End Try
  
  I just want to get Result to be True or False to return as a value.</p>