Méthode ADO CopyTo


❮ Référence complète de l'objet de flux

La méthode CopyTo est utilisée pour copier un nombre spécifié de caractères ou d'octets d'un objet Stream ouvert dans un autre objet Stream ouvert.

Le type des deux objets Stream doit être le même. Cependant, les objets Stream textuels peuvent être copiés dans des objets Stream binaires, mais pas l'inverse, et la propriété CharSet de l'objet Stream de destination peut être différente de l'objet Stream source. 

Syntaxe

objStream.CopyTo dest,numchars

Parameter Description
dest Required. Where to copy the Stream (contains a reference to an open Stream object)
numchars Optional. An integer that specifies the number of characters or bytes to be copied from the current position in the source Stream to the destination Stream. Default is -1 (will copy all data from the current position to EOS)

Note: If the specified number is greater than the available number of bytes/characters until EOS, then only bytes/characters from the current position to EOS are copied


❮ Référence complète de l'objet de flux