SqlDataSourceView.Delete(IDictionary, IDictionary) Método
Definição
Executa uma operação de exclusão usando a cadeia de caracteres SQL DeleteCommand, quaisquer parâmetros que estão especificados na coleção DeleteParameters e os valores que estão nas coleções keys e oldValues especificadas.Performs a delete operation using the DeleteCommand SQL string, any parameters that are specified in the DeleteParameters collection, and the values that are in the specified keys and oldValues collections.
public:
int Delete(System::Collections::IDictionary ^ keys, System::Collections::IDictionary ^ oldValues);
public int Delete (System.Collections.IDictionary keys, System.Collections.IDictionary oldValues);
override this.Delete : System.Collections.IDictionary * System.Collections.IDictionary -> int
Public Function Delete (keys As IDictionary, oldValues As IDictionary) As Integer
Parâmetros
- keys
- IDictionary
Um IDictionary dos valores de chave de linha ou objeto para a operação ExecuteDelete(IDictionary, IDictionary) a ser excluída.An IDictionary of object or row key values for the ExecuteDelete(IDictionary, IDictionary) operation to delete.
- oldValues
- IDictionary
Um IDictionary que contém os valores de linha avaliados apenas se a propriedade ConflictDetection estiver definida para o valor CompareAllValues.An IDictionary that contains row values that are evaluated only if the ConflictDetection property is set to the CompareAllValues value.
Retornos
Um valor que representa o número de linhas excluídas no banco de dados subjacente.A value that represents the number of rows deleted from the underlying database.
Exceções
O SqlDataSource não pode estabelecer uma conexão com a fonte de dados subjacente.The SqlDataSource cannot establish a connection with the underlying data source.
- ou --or-
A propriedade ConflictDetection é definida como o valor CompareAllValues e nenhum parâmetro oldValues é passado.The ConflictDetection property is set to the CompareAllValues value and no oldValues parameters are passed.
Comentários
O Delete método chama o ExecuteDelete método, passando os keys oldValues parâmetros e.The Delete method calls the ExecuteDelete method, passing the keys and oldValues parameters.