dotConnect for MySQL Documentation
Devart.Data.MySql Namespace / MySqlBlob Class / Seek Method
A byte offset relative to origin.
A value of System.IO.SeekOrigin type indicating the reference point used to obtain the new position.
Example

In This Topic
    Seek Method (MySqlBlob)
    In This Topic
    Sets the position on the current MySqlBlob stream.
    Syntax
    'Declaration
     
    Public Overrides Function Seek( _
       ByVal offset As Long, _
       ByVal origin As SeekOrigin _
    ) As Long
    public override long Seek( 
       long offset,
       SeekOrigin origin
    )

    Parameters

    offset
    A byte offset relative to origin.
    origin
    A value of System.IO.SeekOrigin type indicating the reference point used to obtain the new position.

    Return Value

    The new position within the current stream.
    Remarks
    If offset is negative, the new position is required to precede the position specified by origin by the number of bytes specified by offset. If offset is zero (0), the new position is required to be the position specified by origin. If offset is positive, the new position is required to follow the position specified by origin by the number of bytes specified by offset.
    Example
    The first line of the example sets stream position to the very first element.
    myBlob.Seek(0, SeekOrigin.Begin);
    Console.WriteLine(myBlob.Position);
    Console.WriteLine(myBlob.ReadByte());
    myBlob.Seek(0, SeekOrigin.Begin)
    Console.WriteLine(myBlob.Position)
    Console.WriteLine(myBlob.ReadByte())
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also