Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TSQLSimpleCommandHandle
Inherited By:
None.
Purpose:
This concrete class is a counted pointer surrogate for TSQLCommand. It extends the semantics of TSQLSimpleCommandHandle by supporting parameterized SQL statements.
As a result, most clients will find TSQLCommandHandle class more useful than TSQLSimpleCommandHandle or TSQLNativeCommandHandle. Clients obtain SQL command handles from appropriate derived classes such as TSQLStandardCommandHandle.
Instantiation:
Always allocate on the stack.
Deriving Classes:
Providers who supply such classes need to use the following constructors:
TSQLCommandHandle(TSQLCommand&);
TSQLCommandHandle(const TSQLCommandHandle& source);
TSQLCommandHandle& operator =(const TSQLCommandHandle& right);
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TSQLCommandHandle ()
- TSQLCommandHandle (const TSQLCommandHandle & source)
- TSQLCommandHandle (TSQLCommand &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
- Instantiates and initializes an object.
Calling Context:
- Called by the stream-in operators and any other function that needs to construct an uninitialized object.
- Called to copy an object.
- Called to instantiate and initialize an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TSQLCommandHandle ()
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.
TSQLCommandHandle & operator =(const TSQLCommandHandle & 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.
- virtual void Execute ()
- virtual void Execute (TRecordSourceHandle &)
Interface Category:
API.
Purpose:
- Executes the SQL command.
- Inserts 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.
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.
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.
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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.