ADO » Stream » Position

Version: 2.5

Syntax:
streamobject.Position = long
long = streamobject.Position

Sets or returns a long value that specifies the current position, measured in bytes, from the beginning of the stream.

The Position property sets or returns a long value that is the number of bytes from the start of the data to the current position inside the Stream object. The start position is defined as zero. You cannot set this property using a negative number.

If the Stream is read-only and you specify a Position that is greater than the actual size of the data, ADO will neither return an error nor modify the contents or size of the Stream. However, if the Stream is read/write and you specify a Position that is greater than the actual size of the data, ADO will increase the size of the Stream object to the new, larger number of bytes and will insert null values to pad the data.

Examples

Code:
objStream.Open rsGuruData, adModeReadWrite
objStream.Position = 0
...
objStream.Close

See Also: