Metoda ADO CopyTo
❮ Pełne odniesienie do obiektu strumienia
Metoda CopyTo służy do kopiowania określonej liczby znaków lub bajtów z otwartego obiektu Stream do innego otwartego obiektu Stream.
Typ dwóch obiektów Stream powinien być taki sam. Jednak obiekty Stream tekstowe można kopiować do obiektów binarnych Stream, ale nie na odwrót, a właściwość CharSet docelowego obiektu Stream może być inna niż źródłowy obiekt Stream.
Składnia
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 |
❮ Pełne odniesienie do obiektu strumienia