Oracle Objects for OLE C++ Class Library
Release 9.0.1

Part Number A90172-01

Home

Book List

Contents

Master Index

Feedback

OSession Method

Applies To

OSession

Description

OSession
constructor

Usage

OSession
(void)

OSession(const OSession &othersess)

OSession(const char *sname)

Arguments

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 © 1996-2001, Oracle Corporation.

All Rights Reserved.

Home

Book List

Contents