Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
DB Interface Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWDBConnCallbackImp

Module:  DB Interface Module   Group:  Callback Classes


RWDBConnCallbackImp RWDBReference

Local Index

Members

Synopsis

#include <rw/db/conncbi.h>

class MyConnCallbackImp : public RWDBConnCallbackImp {
public:
    // PreConnect callback
    virtual void preConnect();
    
    // PostConnect callback
    virtual void postConnect();
};

RWDBConnection connection = myDbase.connection(                         RWDBCONNCALLBACK(MyConnCallbackImp));

Description

RWDBConnCallbackImp is an implementation class and is reference counted.

It is the abstract base class for implementing connection callbacks. You will need to derive from this class to implement your custom connection callbacks.

This class provides six connection callback methods preConnAllocate(), postConnAllocate(), preConnect(), postConnect(), preDisconnect() and preConnDestroy(). Please refer to the DB Interface Module User's Guide and the applicable DB Access Module User's Guide for more information on these methods. You will need to redefine the methods to implement connection callbacks.

Protected Constructors

RWDBConnCallbackImp();

Public Member Functions

virtual void
preConnAllocate();
virtual void
postConnAllocate();
virtual void
preConnect();
virtual void
postConnect();
virtual void
preDisconnect();
virtual void
preConnDestroy();
RWDBDatabaseCallback
databaseCallback() const;
RWDBEnvironmentHandle*
environmentHandle() const;
RWDBSystemHandle*
systemHandle() const;
RWDBStatus
status() const;
void
setError(RWDBStatus::ErrorCode code,
              const RWCString&   message,
              const RWCString&   vendorMessage1 =
                                   RWCString(),
              const RWCString&   vendorMessage2 =
                                 RWCString(),
              long               vendorError1 = 0,
              long               vendorError2 = 0,
              bool               isTerminal = false,
              bool               invokeErrorHandler 
                                   = true,
              bool               invalidateConnection
                                   = false);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.