Edit

Share via


SqlFunctions.DataLength Method

Definition

Returns the number of bytes used to represent any expression.

Overloads

DataLength(Byte[])

Returns the number of bytes used to represent any expression.

DataLength(Nullable<Boolean>)

Returns the number of bytes used to represent any expression.

DataLength(Nullable<DateTime>)

Returns the number of bytes used to represent any expression.

DataLength(Nullable<DateTimeOffset>)

Returns the number of bytes used to represent any expression.

DataLength(Nullable<Decimal>)

Returns the number of bytes used to represent any expression.

DataLength(Nullable<Double>)

Returns the number of bytes used to represent any expression.

DataLength(Nullable<Guid>)

Returns the number of bytes used to represent any expression.

DataLength(Nullable<TimeSpan>)

Returns the number of bytes used to represent any expression.

DataLength(String)

Returns the number of bytes used to represent any expression.

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATALENGTH (Transact-SQL).

DataLength(Byte[])

Returns the number of bytes used to represent any expression.

public:
 static Nullable<int> DataLength(cli::array <System::Byte> ^ arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")]
public static int? DataLength (byte[] arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")>]
static member DataLength : byte[] -> Nullable<int>
Public Shared Function DataLength (arg As Byte()) As Nullable(Of Integer)

Parameters

arg
Byte[]

The value to be examined for length.

Returns

The number of bytes in the input value.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATALENGTH (Transact-SQL).

Applies to

DataLength(Nullable<Boolean>)

Returns the number of bytes used to represent any expression.

public:
 static Nullable<int> DataLength(Nullable<bool> arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")]
public static int? DataLength (bool? arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")>]
static member DataLength : Nullable<bool> -> Nullable<int>
Public Shared Function DataLength (arg As Nullable(Of Boolean)) As Nullable(Of Integer)

Parameters

arg
Nullable<Boolean>

The value to be examined for data length.

Returns

The number of bytes in the input value.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATALENGTH (Transact-SQL).

Applies to

DataLength(Nullable<DateTime>)

Returns the number of bytes used to represent any expression.

public:
 static Nullable<int> DataLength(Nullable<DateTime> arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")]
public static int? DataLength (DateTime? arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")>]
static member DataLength : Nullable<DateTime> -> Nullable<int>
Public Shared Function DataLength (arg As Nullable(Of DateTime)) As Nullable(Of Integer)

Parameters

arg
Nullable<DateTime>

The value to be examined for data length.

Returns

The number of bytes in the input value.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATALENGTH (Transact-SQL).

Applies to

DataLength(Nullable<DateTimeOffset>)

Returns the number of bytes used to represent any expression.

public:
 static Nullable<int> DataLength(Nullable<DateTimeOffset> arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")]
public static int? DataLength (DateTimeOffset? arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")>]
static member DataLength : Nullable<DateTimeOffset> -> Nullable<int>
Public Shared Function DataLength (arg As Nullable(Of DateTimeOffset)) As Nullable(Of Integer)

Parameters

arg
Nullable<DateTimeOffset>

The value to be examined for data length.

Returns

The number of bytes in the input value.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATALENGTH (Transact-SQL).

Applies to

DataLength(Nullable<Decimal>)

Returns the number of bytes used to represent any expression.

public:
 static Nullable<int> DataLength(Nullable<System::Decimal> arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")]
public static int? DataLength (decimal? arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")>]
static member DataLength : Nullable<decimal> -> Nullable<int>
Public Shared Function DataLength (arg As Nullable(Of Decimal)) As Nullable(Of Integer)

Parameters

arg
Nullable<Decimal>

The value to be examined for data length.

Returns

The number of bytes in the input value.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATALENGTH (Transact-SQL).

Applies to

DataLength(Nullable<Double>)

Returns the number of bytes used to represent any expression.

public:
 static Nullable<int> DataLength(Nullable<double> arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")]
public static int? DataLength (double? arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")>]
static member DataLength : Nullable<double> -> Nullable<int>
Public Shared Function DataLength (arg As Nullable(Of Double)) As Nullable(Of Integer)

Parameters

arg
Nullable<Double>

The value to be examined for data length.

Returns

The number of bytes in the input value.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATALENGTH (Transact-SQL).

Applies to

DataLength(Nullable<Guid>)

Returns the number of bytes used to represent any expression.

public:
 static Nullable<int> DataLength(Nullable<Guid> arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")]
public static int? DataLength (Guid? arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")>]
static member DataLength : Nullable<Guid> -> Nullable<int>
Public Shared Function DataLength (arg As Nullable(Of Guid)) As Nullable(Of Integer)

Parameters

arg
Nullable<Guid>

The value to be examined for data length.

Returns

The number of bytes in the input value.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATALENGTH (Transact-SQL).

Applies to

DataLength(Nullable<TimeSpan>)

Returns the number of bytes used to represent any expression.

public:
 static Nullable<int> DataLength(Nullable<TimeSpan> arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")]
public static int? DataLength (TimeSpan? arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")>]
static member DataLength : Nullable<TimeSpan> -> Nullable<int>
Public Shared Function DataLength (arg As Nullable(Of TimeSpan)) As Nullable(Of Integer)

Parameters

arg
Nullable<TimeSpan>

The value to be examined for data length.

Returns

The number of bytes in the input value.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATALENGTH (Transact-SQL).

Applies to

DataLength(String)

Returns the number of bytes used to represent any expression.

public:
 static Nullable<int> DataLength(System::String ^ arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")]
public static int? DataLength (string arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATALENGTH")>]
static member DataLength : string -> Nullable<int>
Public Shared Function DataLength (arg As String) As Nullable(Of Integer)

Parameters

arg
String

The value to be examined for data length.

Returns

The number of bytes in the input value.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATALENGTH (Transact-SQL).

Applies to