Location:
d32dbms.h
Link against: edbms.lib
RDbs
Supported from 5.0
Represents a session with the DBMS server. A thread uses this class to set up a DBMS server session and this provides the basis for sharing databases with other threads.
|
Defined in RDbs
:
Connect()
, ResourceCheck()
, ResourceCount()
, ResourceMark()
, SetHeapFailure()
, Version()
Inherited from RHandleBase
:
Close()
,
Duplicate()
,
Handle()
,
SetHandle()
Inherited from RSessionBase
:
Attach()
,
CreateSession()
,
EAutoAttach
,
EExplicitAttach
,
Send()
,
SendReceive()
,
SetRetry()
,
Share()
,
TAttachMode
TInt Connect();
Makes a connection with the DBMS server. This function causes the server to start, if it is not already running.
This should be the first function called on an
RDbs
object after it is created.
Once a connection has been established, databases can be opened through the server.
Note that:
Threads can make any number of simultaneous connections to the DBMS server.
The session must stay open until all DBMS objects opened through the server have been closed.
The session is terminated by calling the
Close()
member function provided by the RSessionBase
class.
|
static TVersion Version();
Returns the version of the DBMS server.
|
void ResourceMark();
Marks the start point for checking the number of DBMS objects allocated in this session.
The function takes the current number of allocated DBMS objects as its benchmark number.
A call to this function is normally followed by a later call to
ResourceCheck()
which expects that the number of allocated DBMS
objects to be the same as this benchmark number.
void ResourceCheck();
Checks that the number of DBMS objects allocated in this session is
the same as the benchmark number recorded by an earlier call to
ResourceMark()
.
The function raises a CSession 2 panic if the current number of DBMS
objects is not the same as that recorded by an earlier call to
ResourceMark()
.
TInt ResourceCount();
Returns the number of DBMS objects allocated in this session.
|
void SetHeapFailure(RHeap::TAllocFail aType,TInt aRate);
Simulates a heap allocation failure in the DBMS server's heap.
The function behaves as described by
User::__DbgSetAllocFail()
.
Note that this function has no effect if running with a release build of EUSER.DLL.
|