OracleBFile.CopyTo Method (Int64, OracleLob, Int64, Int64)

Copies from this OracleBFile to a destination OracleLob with the specified amount of data, the source offset, and the destination offset.

Namespace: System.Data.OracleClient
Assembly: System.Data.OracleClient (in

Public Function CopyTo ( _
	sourceOffset As Long, _
	destination As OracleLob, _
	destinationOffset As Long, _
	amount As Long _
) As Long
Dim instance As OracleBFile
Dim sourceOffset As Long
Dim destination As OracleLob
Dim destinationOffset As Long
Dim amount As Long
Dim returnValue As Long

returnValue = instance.CopyTo(sourceOffset, destination, destinationOffset, amount)
public long CopyTo (
	long sourceOffset, 
	OracleLob destination, 
	long destinationOffset, 
	long amount
public function CopyTo (
	sourceOffset : long, 
	destination : OracleLob, 
	destinationOffset : long, 
	amount : long
) : long



The offset from which to copy.


The destination OracleLob.


The offset to which to copy.


The quantity of data, in bytes, to copy.

Return Value

The number of bytes copied.

Exception typeCondition


The value of the amount parameter is less than zero or greater than 4 gigabytes.


The destination OracleLob is a null object reference.


The destination is a null OracleLob.


The connection with which this OracleBFile is associated is closed.


The OracleBFile object is closed or disposed.

The underlying data types of the source OracleBFile and the destination OracleLob must be compatible. For example, you cannot copy binary data to a destination OracleLob that has a character data type.

You must have write access to the destination OracleLob for the CopyTo operation to execute correctly.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1