Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the position on the current OracleBFile stream.
public:
override long Seek(long offset, System::IO::SeekOrigin origin);
public override long Seek(long offset, System.IO.SeekOrigin origin);
override this.Seek : int64 * System.IO.SeekOrigin -> int64
Public Overrides Function Seek (offset As Long, origin As SeekOrigin) As Long
A byte offset relative to origin. If offset is negative, the new position will precede the position specified by origin by the number of bytes specified by offset. If offset is zero, the new position will be the position specified by origin. If offset is positive, the new position will follow the position specified by origin by the number of bytes specified by offset.
A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position.
The new position within the current stream.
Attempted to set a position with a negative value or greater than the length of the stream.
Methods were called after the stream was closed or disposed.
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, 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.
Seeking to any location beyond the length of the stream is not supported.
Any attempt to access a closed OracleBFile using the Read or Seek methods reopens an OracleBFile stream automatically.
The following C# example assumes this schema in an Oracle table:
(col1 number, col2 BFILE)
The example demonstrates using the Read and Seek methods to access an OracleBFile object.
byte[] buffer = new byte[100];
OracleDataReader dataReader = command.ExecuteReader();
using (dataReader) {
if (dataReader.Read()) {
OracleBFile BFile = dataReader.GetOracleBFile(1);
using (BFile) {
BFile.Seek(0, SeekOrigin.Begin);
BFile.Read(buffer, 0, 100);
}
}
}
| Product | Versions |
|---|---|
| .NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in