Executes the query and returns the first column of the first row in the resultset returned by the query.

Namespace: System.Extensions.Data
Assembly: System.Extensions (in System.Extensions.dll) Version: 0.0.0.5 (0.0.0.5)

Syntax

C#
public static Nullable<byte> ExecuteByte(
	this IDbCommand command
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function ExecuteByte ( 
	command As IDbCommand
) As Nullable(Of Byte)
Visual C++
public:
[ExtensionAttribute]
static Nullable<unsigned char> ExecuteByte(
	IDbCommand^ command
)
F#
static member ExecuteByte : 
        command : IDbCommand -> Nullable<byte> 

Parameters

command
Type: System.Data..::..IDbCommand
The command to execute.

Return Value

Type: Nullable<(Of <(<'Byte>)>)>
The value of the field.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDbCommand. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also