Dela via


SqlMetaData.Adjust Method

Definition

Overloads

Adjust(Double)

Validates the specified Double value against the metadata, and adjusts the value if necessary.

Adjust(SqlString)

Validates the specified SqlString value against the metadata, and adjusts the value if necessary.

Adjust(SqlXml)

Validates the specified SqlXml value against the metadata, and adjusts the value if necessary.

Adjust(DateTime)

Validates the specified DateTime value against the metadata, and adjusts the value if necessary.

Adjust(DateTimeOffset)

Validates the specified DateTimeOffset value against the metadata, and adjusts the value if necessary.

Adjust(Decimal)

Validates the specified Decimal value against the metadata, and adjusts the value if necessary.

Adjust(Guid)

Validates the specified Guid value against the metadata, and adjusts the value if necessary.

Adjust(TimeSpan)

Validates the specified TimeSpan value against the metadata, and adjusts the value if necessary.

Adjust(Int32)

Validates the specified Int32 value against the metadata, and adjusts the value if necessary.

Adjust(Int64)

Validates the specified Int64 value against the metadata, and adjusts the value if necessary.

Adjust(Object)

Validates the specified Object value against the metadata, and adjusts the value if necessary.

Adjust(Single)

Validates the specified Single value against the metadata, and adjusts the value if necessary.

Adjust(String)

Validates the specified String value against the metadata, and adjusts the value if necessary.

Adjust(SqlMoney)

Validates the specified SqlMoney value against the metadata, and adjusts the value if necessary.

Adjust(Int16)

Validates the specified Int16 value against the metadata, and adjusts the value if necessary.

Adjust(SqlInt64)

Validates the specified SqlInt64 value against the metadata, and adjusts the value if necessary.

Adjust(SqlSingle)

Validates the specified SqlSingle value against the metadata, and adjusts the value if necessary.

Adjust(SqlInt16)

Validates the specified SqlInt16 value against the metadata, and adjusts the value if necessary.

Adjust(Byte)

Validates the specified Byte value against the metadata, and adjusts the value if necessary.

Adjust(Byte[])

Validates the specified array of Byte values against the metadata, and adjusts the value if necessary.

Adjust(Char)

Validates the specified Char value against the metadata, and adjusts the value if necessary.

Adjust(Char[])

Validates the specified array of Char values against the metadata, and adjusts the value if necessary.

Adjust(SqlBinary)

Validates the specified SqlBinary value against the metadata, and adjusts the value if necessary.

Adjust(SqlBoolean)

Validates the specified SqlBoolean value against the metadata, and adjusts the value if necessary.

Adjust(Boolean)

Validates the specified Boolean value against the metadata, and adjusts the value if necessary.

Adjust(SqlByte)

Validates the specified SqlByte value against the metadata, and adjusts the value if necessary.

Adjust(SqlChars)

Validates the specified SqlChars value against the metadata, and adjusts the value if necessary.

Adjust(SqlDateTime)

Validates the specified SqlDateTime value against the metadata, and adjusts the value if necessary.

Adjust(SqlDecimal)

Validates the specified SqlDecimal value against the metadata, and adjusts the value if necessary.

Adjust(SqlDouble)

Validates the specified SqlDouble value against the metadata, and adjusts the value if necessary.

Adjust(SqlGuid)

Validates the specified SqlGuid value against the metadata, and adjusts the value if necessary.

Adjust(SqlInt32)

Validates the specified SqlInt32 value against the metadata, and adjusts the value if necessary.

Adjust(SqlBytes)

Validates the specified SqlBytes value against the metadata, and adjusts the value if necessary.

Adjust(Double)

Validates the specified Double value against the metadata, and adjusts the value if necessary.

public:
 double Adjust(double value);
public double Adjust (double value);
member this.Adjust : double -> double
Public Function Adjust (value As Double) As Double

Parameters

value
Double

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a Double.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlString)

Validates the specified SqlString value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlString Adjust(System::Data::SqlTypes::SqlString value);
public System.Data.SqlTypes.SqlString Adjust (System.Data.SqlTypes.SqlString value);
member this.Adjust : System.Data.SqlTypes.SqlString -> System.Data.SqlTypes.SqlString
Public Function Adjust (value As SqlString) As SqlString

Parameters

value
SqlString

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlString.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlXml)

Validates the specified SqlXml value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlXml ^ Adjust(System::Data::SqlTypes::SqlXml ^ value);
public System.Data.SqlTypes.SqlXml Adjust (System.Data.SqlTypes.SqlXml value);
member this.Adjust : System.Data.SqlTypes.SqlXml -> System.Data.SqlTypes.SqlXml
Public Function Adjust (value As SqlXml) As SqlXml

Parameters

value
SqlXml

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlXml.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(DateTime)

Validates the specified DateTime value against the metadata, and adjusts the value if necessary.

public:
 DateTime Adjust(DateTime value);
public DateTime Adjust (DateTime value);
member this.Adjust : DateTime -> DateTime
Public Function Adjust (value As DateTime) As DateTime

Parameters

value
DateTime

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a DateTime.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(DateTimeOffset)

Validates the specified DateTimeOffset value against the metadata, and adjusts the value if necessary.

public:
 DateTimeOffset Adjust(DateTimeOffset value);
public DateTimeOffset Adjust (DateTimeOffset value);
member this.Adjust : DateTimeOffset -> DateTimeOffset
Public Function Adjust (value As DateTimeOffset) As DateTimeOffset

Parameters

value
DateTimeOffset

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as an array of DateTimeOffset values.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(Decimal)

Validates the specified Decimal value against the metadata, and adjusts the value if necessary.

public:
 System::Decimal Adjust(System::Decimal value);
public decimal Adjust (decimal value);
member this.Adjust : decimal -> decimal
Public Function Adjust (value As Decimal) As Decimal

Parameters

value
Decimal

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a Decimal.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(Guid)

Validates the specified Guid value against the metadata, and adjusts the value if necessary.

public:
 Guid Adjust(Guid value);
public Guid Adjust (Guid value);
member this.Adjust : Guid -> Guid
Public Function Adjust (value As Guid) As Guid

Parameters

value
Guid

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a Guid.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(TimeSpan)

Validates the specified TimeSpan value against the metadata, and adjusts the value if necessary.

public:
 TimeSpan Adjust(TimeSpan value);
public TimeSpan Adjust (TimeSpan value);
member this.Adjust : TimeSpan -> TimeSpan
Public Function Adjust (value As TimeSpan) As TimeSpan

Parameters

value
TimeSpan

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as an array of TimeSpan values.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(Int32)

Validates the specified Int32 value against the metadata, and adjusts the value if necessary.

public:
 int Adjust(int value);
public int Adjust (int value);
member this.Adjust : int -> int
Public Function Adjust (value As Integer) As Integer

Parameters

value
Int32

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a Int32.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(Int64)

Validates the specified Int64 value against the metadata, and adjusts the value if necessary.

public:
 long Adjust(long value);
public long Adjust (long value);
member this.Adjust : int64 -> int64
Public Function Adjust (value As Long) As Long

Parameters

value
Int64

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a Int64.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(Object)

Validates the specified Object value against the metadata, and adjusts the value if necessary.

public:
 System::Object ^ Adjust(System::Object ^ value);
public object Adjust (object value);
member this.Adjust : obj -> obj
Public Function Adjust (value As Object) As Object

Parameters

value
Object

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a Object.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(Single)

Validates the specified Single value against the metadata, and adjusts the value if necessary.

public:
 float Adjust(float value);
public float Adjust (float value);
member this.Adjust : single -> single
Public Function Adjust (value As Single) As Single

Parameters

value
Single

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a Single.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(String)

Validates the specified String value against the metadata, and adjusts the value if necessary.

public:
 System::String ^ Adjust(System::String ^ value);
public string Adjust (string value);
member this.Adjust : string -> string
Public Function Adjust (value As String) As String

Parameters

value
String

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a String.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlMoney)

Validates the specified SqlMoney value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlMoney Adjust(System::Data::SqlTypes::SqlMoney value);
public System.Data.SqlTypes.SqlMoney Adjust (System.Data.SqlTypes.SqlMoney value);
member this.Adjust : System.Data.SqlTypes.SqlMoney -> System.Data.SqlTypes.SqlMoney
Public Function Adjust (value As SqlMoney) As SqlMoney

Parameters

value
SqlMoney

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlMoney.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(Int16)

Validates the specified Int16 value against the metadata, and adjusts the value if necessary.

public:
 short Adjust(short value);
public short Adjust (short value);
member this.Adjust : int16 -> int16
Public Function Adjust (value As Short) As Short

Parameters

value
Int16

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a Int16.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlInt64)

Validates the specified SqlInt64 value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlInt64 Adjust(System::Data::SqlTypes::SqlInt64 value);
public System.Data.SqlTypes.SqlInt64 Adjust (System.Data.SqlTypes.SqlInt64 value);
member this.Adjust : System.Data.SqlTypes.SqlInt64 -> System.Data.SqlTypes.SqlInt64
Public Function Adjust (value As SqlInt64) As SqlInt64

Parameters

value
SqlInt64

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlInt64.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlSingle)

Validates the specified SqlSingle value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlSingle Adjust(System::Data::SqlTypes::SqlSingle value);
public System.Data.SqlTypes.SqlSingle Adjust (System.Data.SqlTypes.SqlSingle value);
member this.Adjust : System.Data.SqlTypes.SqlSingle -> System.Data.SqlTypes.SqlSingle
Public Function Adjust (value As SqlSingle) As SqlSingle

Parameters

value
SqlSingle

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlSingle.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlInt16)

Validates the specified SqlInt16 value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlInt16 Adjust(System::Data::SqlTypes::SqlInt16 value);
public System.Data.SqlTypes.SqlInt16 Adjust (System.Data.SqlTypes.SqlInt16 value);
member this.Adjust : System.Data.SqlTypes.SqlInt16 -> System.Data.SqlTypes.SqlInt16
Public Function Adjust (value As SqlInt16) As SqlInt16

Parameters

value
SqlInt16

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlInt16.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(Byte)

Validates the specified Byte value against the metadata, and adjusts the value if necessary.

public:
 System::Byte Adjust(System::Byte value);
public byte Adjust (byte value);
member this.Adjust : byte -> byte
Public Function Adjust (value As Byte) As Byte

Parameters

value
Byte

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a Byte.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(Byte[])

Validates the specified array of Byte values against the metadata, and adjusts the value if necessary.

public:
 cli::array <System::Byte> ^ Adjust(cli::array <System::Byte> ^ value);
public byte[] Adjust (byte[] value);
member this.Adjust : byte[] -> byte[]
Public Function Adjust (value As Byte()) As Byte()

Parameters

value
Byte[]

The value to validate against the SqlMetaData instance.

Returns

Byte[]

The adjusted value as an array of Byte values.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(Char)

Validates the specified Char value against the metadata, and adjusts the value if necessary.

public:
 char Adjust(char value);
public char Adjust (char value);
member this.Adjust : char -> char
Public Function Adjust (value As Char) As Char

Parameters

value
Char

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a Char.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(Char[])

Validates the specified array of Char values against the metadata, and adjusts the value if necessary.

public:
 cli::array <char> ^ Adjust(cli::array <char> ^ value);
public char[] Adjust (char[] value);
member this.Adjust : char[] -> char[]
Public Function Adjust (value As Char()) As Char()

Parameters

value
Char[]

The value to validate against the SqlMetaData instance.

Returns

Char[]

The adjusted value as an array Char values.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlBinary)

Validates the specified SqlBinary value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlBinary Adjust(System::Data::SqlTypes::SqlBinary value);
public System.Data.SqlTypes.SqlBinary Adjust (System.Data.SqlTypes.SqlBinary value);
member this.Adjust : System.Data.SqlTypes.SqlBinary -> System.Data.SqlTypes.SqlBinary
Public Function Adjust (value As SqlBinary) As SqlBinary

Parameters

value
SqlBinary

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlBinary.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlBoolean)

Validates the specified SqlBoolean value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlBoolean Adjust(System::Data::SqlTypes::SqlBoolean value);
public System.Data.SqlTypes.SqlBoolean Adjust (System.Data.SqlTypes.SqlBoolean value);
member this.Adjust : System.Data.SqlTypes.SqlBoolean -> System.Data.SqlTypes.SqlBoolean
Public Function Adjust (value As SqlBoolean) As SqlBoolean

Parameters

value
SqlBoolean

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlBoolean.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(Boolean)

Validates the specified Boolean value against the metadata, and adjusts the value if necessary.

public:
 bool Adjust(bool value);
public bool Adjust (bool value);
member this.Adjust : bool -> bool
Public Function Adjust (value As Boolean) As Boolean

Parameters

value
Boolean

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a Boolean.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlByte)

Validates the specified SqlByte value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlByte Adjust(System::Data::SqlTypes::SqlByte value);
public System.Data.SqlTypes.SqlByte Adjust (System.Data.SqlTypes.SqlByte value);
member this.Adjust : System.Data.SqlTypes.SqlByte -> System.Data.SqlTypes.SqlByte
Public Function Adjust (value As SqlByte) As SqlByte

Parameters

value
SqlByte

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlByte.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlChars)

Validates the specified SqlChars value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlChars ^ Adjust(System::Data::SqlTypes::SqlChars ^ value);
public System.Data.SqlTypes.SqlChars Adjust (System.Data.SqlTypes.SqlChars value);
member this.Adjust : System.Data.SqlTypes.SqlChars -> System.Data.SqlTypes.SqlChars
Public Function Adjust (value As SqlChars) As SqlChars

Parameters

value
SqlChars

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlChars.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlDateTime)

Validates the specified SqlDateTime value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlDateTime Adjust(System::Data::SqlTypes::SqlDateTime value);
public System.Data.SqlTypes.SqlDateTime Adjust (System.Data.SqlTypes.SqlDateTime value);
member this.Adjust : System.Data.SqlTypes.SqlDateTime -> System.Data.SqlTypes.SqlDateTime
Public Function Adjust (value As SqlDateTime) As SqlDateTime

Parameters

value
SqlDateTime

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlDateTime.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlDecimal)

Validates the specified SqlDecimal value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlDecimal Adjust(System::Data::SqlTypes::SqlDecimal value);
public System.Data.SqlTypes.SqlDecimal Adjust (System.Data.SqlTypes.SqlDecimal value);
member this.Adjust : System.Data.SqlTypes.SqlDecimal -> System.Data.SqlTypes.SqlDecimal
Public Function Adjust (value As SqlDecimal) As SqlDecimal

Parameters

value
SqlDecimal

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlDecimal.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlDouble)

Validates the specified SqlDouble value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlDouble Adjust(System::Data::SqlTypes::SqlDouble value);
public System.Data.SqlTypes.SqlDouble Adjust (System.Data.SqlTypes.SqlDouble value);
member this.Adjust : System.Data.SqlTypes.SqlDouble -> System.Data.SqlTypes.SqlDouble
Public Function Adjust (value As SqlDouble) As SqlDouble

Parameters

value
SqlDouble

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlDouble.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlGuid)

Validates the specified SqlGuid value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlGuid Adjust(System::Data::SqlTypes::SqlGuid value);
public System.Data.SqlTypes.SqlGuid Adjust (System.Data.SqlTypes.SqlGuid value);
member this.Adjust : System.Data.SqlTypes.SqlGuid -> System.Data.SqlTypes.SqlGuid
Public Function Adjust (value As SqlGuid) As SqlGuid

Parameters

value
SqlGuid

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlGuid.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlInt32)

Validates the specified SqlInt32 value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlInt32 Adjust(System::Data::SqlTypes::SqlInt32 value);
public System.Data.SqlTypes.SqlInt32 Adjust (System.Data.SqlTypes.SqlInt32 value);
member this.Adjust : System.Data.SqlTypes.SqlInt32 -> System.Data.SqlTypes.SqlInt32
Public Function Adjust (value As SqlInt32) As SqlInt32

Parameters

value
SqlInt32

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlInt32.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to

Adjust(SqlBytes)

Validates the specified SqlBytes value against the metadata, and adjusts the value if necessary.

public:
 System::Data::SqlTypes::SqlBytes ^ Adjust(System::Data::SqlTypes::SqlBytes ^ value);
public System.Data.SqlTypes.SqlBytes Adjust (System.Data.SqlTypes.SqlBytes value);
member this.Adjust : System.Data.SqlTypes.SqlBytes -> System.Data.SqlTypes.SqlBytes
Public Function Adjust (value As SqlBytes) As SqlBytes

Parameters

value
SqlBytes

The value to validate against the SqlMetaData instance.

Returns

The adjusted value as a SqlBytes.

Exceptions

value does not match the SqlMetaData type, or value could not be adjusted.

Applies to