Oracle Objects for OLE C++ Class Library Release 9.2 Part Number A95896-01 |
|
Applies To
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 |
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);
|
Copyright © 1998, 2002 Oracle Corporation. All Rights Reserved. |
|