[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'sqldb' (#fcl)

TCustomSQLQuery

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Custom Class to handle SQL commands (with or without result set)

Declaration

Source position: sqldb.pp line 411

type TCustomSQLQuery = class(TCustomBufDataset) end;

public

  constructor Create(); override;

  

Create a new instance of TCustomSQLQuery.

  destructor Destroy; override;

  

Destroy instance of TCustomSQLQuery

  procedure Prepare; virtual;

  

Prepare a query for execution.

  procedure UnPrepare; virtual;

  

Unprepare a prepared query

  procedure ExecSQL; virtual;

  

Execute a SQL statement that does not return a result set

  procedure SetSchemaInfo(); virtual;

  

SetSchemaInfo prepares the dataset to retrieve schema info.

  function RowsAffected; virtual;

  

Return the number of rows (records) affected by the last DML/DDL statement

  function ParamByName();

  

Return parameter by name

  property Prepared: Boolean; [r]

  

Is the query prepared ?

  property SQLConnection: TSQLConnection; [rw]

  

Database as TSQLConnection

  property SQLTransaction: TSQLTransaction; [rw]

  

Transaction as TSQLTransaction

  procedure ApplyUpdates(); override; overload;

  

Apply updates and check result

  procedure Post; override;

  

Post pending changes and optionally apply updates

  procedure Delete; override;

  

Delete and optionally apply updates

Inheritance

TCustomSQLQuery

  

Custom Class to handle SQL commands (with or without result set)

|

TCustomBufDataset

?

TObject

Description

TCustomSQLQuery encapsulates a SQL statement: it implements all the necessary #fcl.db.TDataset functionality to be able to handle a result set. It can also be used to execute SQL statements that do not return data, using the ExecSQL method.

Do not instantiate a TCustomSQLQuery class directly, instead use the TSQLQuery descendent.

See also

TSQLQuery

  

Class to handle SQL commands (with or without result set)


Documentation generated on: Nov 14 2015