dotConnect for PostgreSQL Documentation
Devart.Data.PostgreSql Namespace / PgSqlBlob Class / Write Method
An array of bytes.
The zero-based byte offset in the buffer.
The amount of bytes to be written to the current stream.
Example

In This Topic
    Write Method (PgSqlBlob)
    In This Topic
    Writes a sequence of bytes to the current PgSqlBlob stream, and advances the current position within this stream by the number of bytes written.
    Syntax
    'Declaration
     
    Public Overrides Sub Write( _
       ByVal buffer() As Byte, _
       ByVal offset As Integer, _
       ByVal count As Integer _
    ) 
    public override void Write( 
       byte[] buffer,
       int offset,
       int count
    )

    Parameters

    buffer
    An array of bytes.
    offset
    The zero-based byte offset in the buffer.
    count
    The amount of bytes to be written to the current stream.
    Remarks
    If the write operation is successful, the position within the stream advances by the number of bytes written.
    Example
    In the example a byte array is filled and written to a newly created PgSqlBlob instance.
    byte[] myByteArray = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
    PgSqlBlob myBlob = new PgSqlBlob();
    myBlob.Write(myByteArray,0,10);
    Dim myByteArray() As Byte = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
    Dim myBlob As PgSqlBlob = New PgSqlBlob
    myBlob.Write(myByteArray, 0, 10)
    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