Class IDatastoreDB2

IDatastoreDB2 objects manage datastore connections for databases using DB2 access (either CLI or ESQL).


Hierarchy

Inherits from:

IBase
 |
 +----IVBase
       |
       +----INotifier
             |
             +----IStandardNotifier
                   |
                   +----IDatastoreBase
                         |
                         +----IDatastoreBaseCLI
                               |
                               +----IDatastoreDB2

Inherited by:

IDatastoreDB2
 |
 +----<class>Datastore

Public Functions by Category

Constructor

IDatastoreDB2

public:
IDatastoreDB2( const char* datastoreName = 0
             , const char* connectString = 0 );
Supported Platforms
Windows OS/2 AIX
Y Y Y

Destructor

~IDatastoreDB2

public:
virtual ~IDatastoreDB2 ();
Supported Platforms
Windows OS/2 AIX
Y Y Y

Shared Mode Settings

isShareModeExclusive

public:
IBoolean isShareModeExclusive() const;

This method returns an IBoolean value of true if the datastore access mode is exclusive (read and write enabled), or false if it is not. Initially the class is set to be share mode exclusive.

Supported Platforms
Windows OS/2 AIX
Y Y Y

enableShareModeExclusive

public:
IDatastoreDB2& enableShareModeExclusive(IBoolean enable = true);

Use this method to set the share mode for the datastore. Pass in true to enable exclusive mode (read and write enabled) or false to disable exclusive mode. Initially the class is set to be share mode exclusive.

Supported Platforms
Windows OS/2 AIX
Y Y Y

Database Connection

setConnection

public:
IDatastoreDB2& setConnection();

Use this method to set this object as the current ESQL connection. Multiple ESQL active connections are not prevented, but this method must be called to switch from the current active connection when not using Data Access Builder-generated SQL code.

Supported Platforms
Windows OS/2 AIX
Y Y Y

startDatabaseManager

public:
virtual void startDatabaseManager();

Use this method to start the database manager. The connect method will start the database manager automatically, if necessary. You must be logged on if this method is called from a PM GUI thread in OS/2.

Supported Platforms
Windows OS/2 AIX
Y Y Y

stopDatabaseManager

public:
virtual void stopDatabaseManager();

Use this method to stop the database manager. You must be logged on if this method is called from a PM GUI thread in OS/2.

Supported Platforms
Windows OS/2 AIX
Y Y Y

setConnectionString

public:
IDatastoreBaseCLI& setConnectionString(const char* aConnectionString);
Supported Platforms
Windows OS/2 AIX
Y Y Y

Use this method to pass in a connection string for the connect method.

Application Default Datastore Functions

applicationDefault

public:
static IDatastoreDB2* applicationDefault();

Use this method to return the current application default datastore setting. If this method returns null, then any datastore constructor will set the application default to the new datastore. Unless a class- or object-level datastore setting is made, the application default datastore is used for all datastore transactions.

Supported Platforms
Windows OS/2 AIX
Y Y Y

setAsApplicationDefault

public:
void setAsApplicationDefault();

Use this method to set the application default datastore to the current datastore object. Unless a class- or object-level datastore setting is made, the application default datastore is used for all datastore transactions.

Supported Platforms
Windows OS/2 AIX
Y Y Y

removeAsApplicationDefault

public:
void removeAsApplicationDefault();

Use this method to remove the datastore as application default, if it currently is. This will make the application default datastore setting null. If the datastore is not the application default, calling this method has no effect. The destructor calls this method.

Supported Platforms
Windows OS/2 AIX
Y Y Y

Public Data by Category

Share Mode

shareMode

public:
enum shareMode { notSet, userSet, share, excusive };
Supported Platforms
Windows OS/2 AIX
Y Y Y

Notification ID Support

public:
static const INotificationId shareModeExcludiveId;
static const INotificationId databaseManagerStartedId;
static const INotificationId databaseManagerStoppedId;
Supported Platforms
Windows OS/2 AIX
Y Y Y

Protected Functions

doConnect

protected:
virtual void doConnect( const char* aUserName, 
                        const char* aAuthentication );

This method is used by the connect method. This method will start the database manager if required.

Supported Platforms
Windows OS/2 AIX
Y Y Y

modeset

protected:
IDatastoreDB2::shareMode modeset(const char* connectString);
Supported Platforms
Windows OS/2 AIX
Y Y Y

Inherited Members

Inherited from IDatastoreBase:

Public Functions

Public Data

Protected Functions

Inherited from IDatastoreBaseCLI:

Public Functions

Public Data

Protected Functions