OpenPetra
Free Administration Software for Non-Profits
Ict.Petra.Server.MCommon.TReportingDbAdapter Class Reference

Reporting Query for use with 'FastReports', with Cancel Option. More...

Public Member Functions

 TReportingDbAdapter ()
 Constructor. It establishes a DB Connection for a FastReports Report. More...
 
void CloseConnection ()
 Call this to ensure that the DB Connection that got established for the Report gets closed. This only really happens if EstablishDBConnection got called with Argument 'ASeparateDBConnection' set to true, otherwise this Method does nothing. More...
 
DataTable RunQuery (String Query, String TableName, TDBTransaction Trans, TDataBase.TOptionalColumnMappingDelegate AOptionalColumnNameMapping=null, int ASelectCommandTimeout=-1, DbParameter[] AParametersArray=null)
 Run this Database query. If FReportingQueryCancelFlag is set, this returns immediately with an empty table. The query can be cancelled WHILE IT IS RUNNING. In this case the returned table may be partially filled. More...
 
DataTable RunQueryMultiParams (String Query, String TableName, TDBTransaction Trans, TDataBase.TOptionalColumnMappingDelegate AOptionalColumnNameMapping=null, int ASelectCommandTimeout=-1, DbParameter[] AParameterDefinitions=null, List< object[]>AParameterValues=null, bool APrepareSelectCommand=false, Int16 AProgressUpdateEveryNRecs=0, TDataBase.MultipleParamQueryProgressUpdateDelegate AMultipleParamQueryProgressUpdateCallback=null)
 Run this Database query. If FReportingQueryCancelFlag is set, this returns immediately with an empty table. The query can be cancelled WHILE IT IS RUNNING. In this case the returned table may be partially filled. More...
 

Static Public Member Functions

static TDataBase EstablishDBConnection (String AConnectionName="")
 Establishes a DB Connection for a FastReports Report. More...
 

Public Attributes

TDataBase FPrivateDatabaseObj
 Use this object for creating DB Transactions, etc More...
 

Properties

Boolean IsCancelled [get]
 We don't support cancelling anymore More...
 
Exception RunQueryException [get]
 Exception that occured during a RunQuery call (if any!) More...
 

Detailed Description

Reporting Query for use with 'FastReports', with Cancel Option.

Constructor & Destructor Documentation

◆ TReportingDbAdapter()

Ict.Petra.Server.MCommon.TReportingDbAdapter.TReportingDbAdapter ( )
inline

Constructor. It establishes a DB Connection for a FastReports Report.

Member Function Documentation

◆ CloseConnection()

void Ict.Petra.Server.MCommon.TReportingDbAdapter.CloseConnection ( )
inline

Call this to ensure that the DB Connection that got established for the Report gets closed. This only really happens if EstablishDBConnection got called with Argument 'ASeparateDBConnection' set to true, otherwise this Method does nothing.

◆ EstablishDBConnection()

static TDataBase Ict.Petra.Server.MCommon.TReportingDbAdapter.EstablishDBConnection ( String  AConnectionName = "")
inlinestatic

Establishes a DB Connection for a FastReports Report.

Returns
Instance of TDataBase that has an open DB Connection.

◆ RunQuery()

DataTable Ict.Petra.Server.MCommon.TReportingDbAdapter.RunQuery ( String  Query,
String  TableName,
TDBTransaction  Trans,
TDataBase.TOptionalColumnMappingDelegate  AOptionalColumnNameMapping = null,
int  ASelectCommandTimeout = -1,
DbParameter[]  AParametersArray = null 
)
inline

Run this Database query. If FReportingQueryCancelFlag is set, this returns immediately with an empty table. The query can be cancelled WHILE IT IS RUNNING. In this case the returned table may be partially filled.

Returns
DataTable. May be empty (even with no fields defined!) if cancellation happens or has happened.

◆ RunQueryMultiParams()

DataTable Ict.Petra.Server.MCommon.TReportingDbAdapter.RunQueryMultiParams ( String  Query,
String  TableName,
TDBTransaction  Trans,
TDataBase.TOptionalColumnMappingDelegate  AOptionalColumnNameMapping = null,
int  ASelectCommandTimeout = -1,
DbParameter[]  AParameterDefinitions = null,
List< object[]>  AParameterValues = null,
bool  APrepareSelectCommand = false,
Int16  AProgressUpdateEveryNRecs = 0,
TDataBase.MultipleParamQueryProgressUpdateDelegate  AMultipleParamQueryProgressUpdateCallback = null 
)
inline

Run this Database query. If FReportingQueryCancelFlag is set, this returns immediately with an empty table. The query can be cancelled WHILE IT IS RUNNING. In this case the returned table may be partially filled.

For details on the Arguments that can be passed with AOptionalColumnNameMapping , ASelectCommandTimeout , AParameterDefinitions , AParameterValues , APrepareSelectCommand , AProgressUpdateEveryNRecs and AMultipleParamQueryProgressUpdateCallback please see their respective XML Comments on Method TDataBase.SelectUsingDataAdapterMulti!/

Returns
DataTable. May be empty (even with no fields defined!) if cancellation happens or has happened.

Member Data Documentation

◆ FPrivateDatabaseObj

TDataBase Ict.Petra.Server.MCommon.TReportingDbAdapter.FPrivateDatabaseObj

Use this object for creating DB Transactions, etc

Property Documentation

◆ IsCancelled

Boolean Ict.Petra.Server.MCommon.TReportingDbAdapter.IsCancelled
get

We don't support cancelling anymore

◆ RunQueryException

Exception Ict.Petra.Server.MCommon.TReportingDbAdapter.RunQueryException
get

Exception that occured during a RunQuery call (if any!)


The documentation for this class was generated from the following file: