Oracle Objects for OLE C++ Class Library Release 9.2 Part Number A95896-01 |
|
Applies To
Description
This method returns an OConnectionCollection object that contains the connections of the session.
Usage
OConnectionCollection GetConnections(void) const
Remarks
A session can have multiple connections associated with it. If you are interested in finding out about the connections of a session as a group, call GetConnections.
Return Value
An OConnectionCollection, which will be open on success, closed on failure.
Example
This example prints out to a file all the database names in the current session.
// we assume an already open FILE * named ofile
// construct and open an OSession on the default session
OSession defsess(0);
// get the connections
OConnectionCollection ccoll = defsess.GetConnections();
// look through all of them
int ii;
for (ii=0; ii<ccoll.GetCount(); ii++)
{ // for each connection, print the database name
fprintf(ofile, "%s\n", ccoll.GetConnection(ii).GetDatabaseName());
}
|
Copyright © 1998, 2002 Oracle Corporation. All Rights Reserved. |
|