TCustomSQLStatement class
Object to execute SQL statements without result set.
Declaration
TCustomSQLStatement = class(TComponent)Inheritance
- TCustomSQLStatement
- TComponent
- TPersistent
- TObject
Descends from it: TSQLStatement
Description
TCustomSQLStatement is a light-weight object that can be used to
execute SQL statements on a database. It does not support result sets, and
has none of the methods that a
TDataset component has. It can
be used to execute SQL statements on a database that update data, execute
stored procedures and DDL statements etc.
The TCustomSQLStatement is equivalent to TSQLQuery
in that it supports transactions (in the Transaction property)
and parameters (in the Params property) and as such is a more
versatile tool than executing queries using ExecuteDirect.
To use a TCustomSQLStatement is simple and similar to the use of
TSQLQuery: set the Database property to an existing connection component, and set the
Transaction property. After setting the SQL
property and filling Params, the SQL statement can be executed
with the Execute method.
TCustomSQLStatement is a parent class. Many of the properties are
only made public (or published) in the
TSQLStatement class, which
should be instantiated instead of the
TCustomSQLStatement class.
See also
Properties
Cursor | protected | |
Database | protected | |
Transaction | protected | |
SQL | protected | |
Params | protected | |
Macros | protected | Set of macros for this SQL statement. |
MacroChar | protected | |
DataSource | protected | |
ParseSQL | protected | |
ParamCheck | protected | |
MacroCheck | protected | Check for macros in the SQL statement. |
InfoQuery | protected | |
Prepared | public | Is the statement prepared or not. |
Methods
CreateDataLink | protected | |
OnChangeSQL | protected | |
GetDataSource | protected | |
SetDataSource | protected | |
CopyParamsFromMaster | protected | |
AllocateCursor | protected | |
DeAllocateCursor | protected | |
GetSchemaType | protected | |
GetSchemaObjectName | protected | |
GetSchemaPattern | protected | |
IsSelectable | protected | |
GetStatementInfo | protected | |
DoExecute | protected | |
DoPrepare | protected | |
DoUnPrepare | protected | |
CreateParams | protected | |
LogEvent | protected | |
Log | protected | |
Notification | protected | Called by components that are freed and which received a FreeNotification. |
Create | public | Create a new instance of TCustomSQLStatement. |
Destroy | public | Destroy a TCustomSQLStatement instance. |
Prepare | public | Prepare the statement for execution. |
Execute | public | Execute the SQL statement. |
Unprepare | public | Unprepare a previously prepared statement. |
ParamByName | public | Find a parameter by name. |
RowsAffected | public | Number of rows affected by the SQL statement. |
Events
OnSQLChanged | protected |
Inherited
From TComponent (73)
_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState
From TPersistent (5)
Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (37)
AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
