Oracle Objects for OLE C++ Class Library
Release 9.2

Part Number A95896-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

OSession Method

Applies To

OSession

Description

OSession constructor

Usage

OSession(void)

OSession(const OSession &othersess)

OSession(const char *sname)

Arguments
Description
othersess
The OSession object to copy.
sname
The name to give to this session
Remarks

These methods construct a new OSession instance.

The default constructor constructs an unopened OSession object. It cannot fail. You must open the object before you can use it.

The copy constructor copies another OSession object. If that other OSession object is open - which means that it is a handle on an implementation session object - the new OSession object becomes a handle to that same session object. The copy constructor copies the reference to the session object but does not copy any strings that the source OSession may own. The copy constructor can fail; check whether the new OSession is open after the constructor call.

The constructor that takes an argument of sname constructs the OSession and then attempts to open it. It will be opened with the name sname. Sname can be NULL, in which case the default OSession is returned. This construct and open constructor can fail; check whether the new OSession is open after the constructor call.

Example

Construct and open the application's default session:

OSession sess(0);


 
Oracle
Copyright © 1998, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback