Oracle Objects for OLE C++ Class Library
Release 9.0.1

Part Number A90172-01

Home

Book List

Contents

Master Index

Feedback

CopyToClipboard Method

Applies To

ODynaset

Description

Copy rows from the dynaset to Windows Clipboard in text format.

Usage

oresult CopyToClipboard(NumOfRows)

oresult CopyToClipboard(NumOfRows ,colsep,rowsep)

Arguments

NumOfRows
Maximum number of rows to be copied to the dynaset
colsep
Column separator in char to be inserted between columns, if 0 then TAB (ASCII 9) will be used
rowsep
Row separator in char to be inserted between Rows, if 0 then NEWLINE (ASCII 13) will be used
Remarks

This method is used to facilitate transfer of data between Oracle Object for OLE
s cache (dynaset) and Windows applications such as Excel or Word. CopyToClipboard copies data starting from current position of the dynaset up to the last row.

Default column separator is TAB (ASCII 9).

Default row separator is ENTER (ASCII 13).

This function uses CF_TEXT internally to copy the data to the clipboard, thus, trying copy the data other than in text format does not work.

Return Value

An oresult indicating whether the operation succeeded (OSUCCESS) or not (OFAILURE).

Example

This example copies the data to the ClipBoard.

// open the database
ODatabase odb("ExampleDB", "scott", "tiger");

// open a dynaset on the orders table
ODynaset orderdyn(odb, "select * from ord");

// copies the entire data to the clipboard
orderdyn.CopyToClipboard(-1, '\t', '\n');


 
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.

Home

Book List

Contents