SqlDataReader.GetSqlXml(Int32) Método

Definição

Obtém o valor da coluna especificada como um valor XML.Gets the value of the specified column as an XML value.

public:
 virtual System::Data::SqlTypes::SqlXml ^ GetSqlXml(int i);
public virtual System.Data.SqlTypes.SqlXml GetSqlXml (int i);
abstract member GetSqlXml : int -> System.Data.SqlTypes.SqlXml
override this.GetSqlXml : int -> System.Data.SqlTypes.SqlXml
Public Overridable Function GetSqlXml (i As Integer) As SqlXml

Parâmetros

i
Int32

O ordinal da coluna baseado em zero.The zero-based column ordinal.

Retornos

SqlXml

Um valor SqlXml que contém o XML armazenado no campo correspondente.A SqlXml value that contains the XML stored within the corresponding field.

Exceções

O índice passado estava fora do intervalo de 0 a FieldCount -1The index passed was outside the range of 0 to FieldCount - 1

Foi feita uma tentativa de ler ou acessar colunas em um SqlDataReader fechado.An attempt was made to read or access columns in a closed SqlDataReader.

Os dados recuperados não são compatíveis com o tipo SqlXml.The retrieved data is not compatible with the SqlXml type.

Comentários

Nenhuma conversões é executada; Portanto, os dados recuperados já devem ser um valor XML.No conversions are performed; therefore, the data retrieved must already be an XML value.

Chame IsDBNull para verificar se há valores nulos antes de chamar este método.Call IsDBNull to check for null values before calling this method.

Aplica-se a