pascalSCADA OPM: HMIDBConnection: Class TProcessSQLCommandThread

Pascal SCADA OPM

Class TProcessSQLCommandThread

Unit

HMIDBConnection

Declaration

type TProcessSQLCommandThread = class(TCrossThread)

Description

: Asynchronous SQL command execution queue.

Hierarchy

Overview

Methods

Protected procedure ReturnStatementsResults;
Public constructor Create(CreateSuspended: Boolean; ExecSQLProc:TExecSQLProc; StartTransactionProc:TStartTransaction; CommitTransactionProc:TCommitTransaction; RollbackTransactionProc:TRollbackTransaction);
Public function WaitEnd(Timeout:Cardinal):TWaitResult;
Public procedure ExecSQLWithoutResultSet(sql:String; ReturnSync:Boolean=true);
Public procedure ExecSQLWithResultSet(sql:String; ReturnDataCallback:TReturnDataSetProc; ReturnSync:Boolean=true);
Public procedure ExecTransaction(aStatements:THMIDBConnectionStatementList; ReturnTransactionResult:TReturnTransactionStatementsProc; FreeStatemensAfterExecute:Boolean; ReturnSync:Boolean=true);

Description

Methods

Protected procedure ReturnStatementsResults;
 
Public constructor Create(CreateSuspended: Boolean; ExecSQLProc:TExecSQLProc; StartTransactionProc:TStartTransaction; CommitTransactionProc:TCommitTransaction; RollbackTransactionProc:TRollbackTransaction);

: Creates the assynchronous queue.

Parameters
CreateSuspended
Boolean. If True, the spool is created suspended, and you must call the procedure Resume to start the queue.
ExecSQLProc
TExecSQLProc. Points to a procedure that will be called to executes the SQL queries.
Public function WaitEnd(Timeout:Cardinal):TWaitResult;

: Waits the end of the thread.

Parameters
Timeout
Cardinal. Maximum timeout to wait the ends.
Returns

Returns wrSignaled if the thread was ended before the timeout elapses. If the thread don't terminate before the timeout, return wrTimeout. If the Destroy was called before of the Terminate procedure, it can return wrAbandoned or wrError.

Public procedure ExecSQLWithoutResultSet(sql:String; ReturnSync:Boolean=true);

: Executes a SQL query without return a Dataset.

Parameters
sql
String. SQL query command.
Public procedure ExecSQLWithResultSet(sql:String; ReturnDataCallback:TReturnDataSetProc; ReturnSync:Boolean=true);

: Executes a SQL query, returning a Dataset.

Parameters
sql
String. SQL query command.
ReturnDataCallback
TReturnDataSetProc. Procedure that will be called to return the dataset.
Public procedure ExecTransaction(aStatements:THMIDBConnectionStatementList; ReturnTransactionResult:TReturnTransactionStatementsProc; FreeStatemensAfterExecute:Boolean; ReturnSync:Boolean=true);
 

Author


Generated by PasDoc 0.14.0.