Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MReferenceCounted
Inherited By:
None.
Purpose:
TSQLCommand is an abstract class. Each connection can be associated with one or more command objects that are responsible for the execution of individual SQL commands. Each command object embodies a parameterized and bound SQL statement and is associated with the code required to process that statement for a given database protocol/server combination. (For example, SQL*Net to Oracle 7, or ODBC to Rdb.)
Instantiation:
Abstract class; do not instantiate.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
virtual ~ TSQLCommand ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSQLCommand::Execute
- virtual void Execute ()
- virtual void Execute (TRecordSourceHandle &)
Interface Category:
API.
Purpose:
- Executes the SQL command.
- This variant of the command lets the client insert data in bulk. The actual SQL command must be a parameterized INSERT statement.
Calling Context:
- Call this function directly.
- Call this function directly.
Parameters:
- Takes no parameters.
- TRecordSourceHandle & -The record source to be used in the INSERT command.
Return Value:
None.
Exceptions:
Throws TSQLClientError exceptions when there is a syntax error.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSQLCommand::GetRecordSource
virtual const TRecordSourceHandle & GetRecordSource (TRecordSourceHandle &) const
Interface Category:
API.
Purpose:
Returns the record source for the executed SQL command. Throws an exception if the given command was not a SELECT statement or was not executed.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The record source for the SQL command.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSQLCommand::InitializeStatement
virtual void InitializeStatement ()
Interface Category:
API.
Purpose:
Postconstruction initialization.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSQLCommand::Parameter
virtual TSQLParameterHandle Parameter (TSQLParameter :: Position)
Interface Category:
API.
Purpose:
Creates a parameter handle that can be used to bind an SQL constant to a command parameter.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The newly created parameter handle.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSQLCommand::GetParameter
virtual const TText & GetParameter (TSQLParameter :: Position, TText &) const
Interface Category:
API.
Purpose:
Returns the value of the given parameter. An empty parameter results in an empty text object.
Calling Context:
Call this function directly.
Parameters:
- TSQLParameter :: Position -Specifies the parameter to be returned.
- TText & -On return, holds the requested parameter.
Return Value:
A const reference to the given parameter.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSQLCommand::GetSQLStatement
virtual const TSQLStatement & GetSQLStatement (TSQLStatement &) const
Interface Category:
API.
Purpose:
Returns the associated SQL statement object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
A const reference to the associated SQL statement object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSQLCommand::DefineResultColumn
virtual void DefineResultColumn (TRecordSource :: ColumnPosition, TRecordSource :: ColumnType, const TText &)
Interface Category:
API.
Purpose:
Specifies the data type of a column in a record source expected from the datastore as result of executing a data retrieval command (for example, SELECT).
Calling Context:
Call this function directly.
Parameters:
- TRecordSource :: ColumnPosition -Specifies the column position.
- TRecordSource :: ColumnType -Specifies the column data type.
- const TText & -Returns, by fill-in reference, the native data type of the column specified.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- TSQLCommand (const TText & sql =TStandardText :: GetEmptyText ())
- TSQLCommand (const TSQLCommand & source)
Interface Category:
API.
Purpose:
- Constructs a command and initializes its associated SQL statement.
- Copy constructor.
Calling Context:
- Call this function directly.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSQLCommand::operator=
TSQLCommand & operator =(const TSQLCommand & right)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.