TIBCO ActiveSpaces®
|
A statment object is used execute SQL and return a resultset. More...
Functions | |
TIBDG_API void | tibdgStatement_ClearParameters (tibEx e, tibdgStatement statement) |
Clears all of the parameter values set on the statement object. More... | |
TIBDG_API void | tibdgStatement_Close (tibEx e, tibdgStatement statement) |
Close the statement object. More... | |
TIBDG_API tibdgResultSet | tibdgStatement_ExecuteQuery (tibEx e, tibdgStatement statement, tibProperties props) |
Executes the query on the statement object and returns the resultset object. More... | |
TIBDG_API tibdgResultSetMetadata | tibdgStatement_GetResultSetMetadata (tibEx e, tibdgStatement statement) |
Get the metadata associated with a statement. More... | |
TIBDG_API void | tibdgStatement_SetDateTime (tibEx e, tibdgStatement statement, tibint32_t parameterIndex, const tibDateTime *dt) |
Sets a datetime value to a parameter number in a statement object. More... | |
TIBDG_API void | tibdgStatement_SetDouble (tibEx e, tibdgStatement statement, tibint32_t parameterIndex, tibdouble_t dvalue) |
Sets a double value to a parameter number in a statement object. More... | |
TIBDG_API void | tibdgStatement_SetLong (tibEx e, tibdgStatement statement, tibint32_t parameterIndex, tibint64_t lvalue) |
Sets a long value to a parameter number in a statement object. More... | |
TIBDG_API void | tibdgStatement_SetNull (tibEx e, tibdgStatement statement, tibint32_t parameterIndex) |
Sets an empty value for a parameter number in a statement object. More... | |
TIBDG_API void | tibdgStatement_SetOpaque (tibEx e, tibdgStatement statement, tibint32_t parameterIndex, const void *ovalue, tibint32_t size) |
Sets an opaque value to a parameter number in a statement object. More... | |
TIBDG_API void | tibdgStatement_SetString (tibEx e, tibdgStatement statement, tibint32_t parameterIndex, const char *svalue) |
Sets a string value to a parameter number in a statement object. More... | |
A statment object is used execute SQL and return a resultset.
A program that creates a statement object must explicitly call tibdgStatement_Close to reclaim its resources.
TIBDG_API void tibdgStatement_ClearParameters | ( | tibEx | e, |
tibdgStatement | statement | ||
) |
Clears all of the parameter values set on the statement object.
After calling this function, all parameters must be set again before calling ExecuteQuery. A partially bound statement object may be closed without calling this function.
e | The exception object captures information about failures. |
statement | The statement to clear bindings |
TIBDG_API void tibdgStatement_Close | ( | tibEx | e, |
tibdgStatement | statement | ||
) |
Close the statement object.
Note that all resultset objects must also be closed to allow for the statement's resources to also be reclaimed.
e | The exception object captures information about failures. |
statement | The statement to be closed. |
TIBDG_API tibdgResultSet tibdgStatement_ExecuteQuery | ( | tibEx | e, |
tibdgStatement | statement, | ||
tibProperties | props | ||
) |
Executes the query on the statement object and returns the resultset object.
Cannot be called if there are any open resultsets on the statement object.
e | The exception object captures information about failures. |
statement | The statement from which to execute the query. |
props | Optional. NULL to omit.
|
TIBDG_API tibdgResultSetMetadata tibdgStatement_GetResultSetMetadata | ( | tibEx | e, |
tibdgStatement | statement | ||
) |
Get the metadata associated with a statement.
e | The exception object captures information about failures. |
statement | The statement to get metadata |
NULL
. TIBDG_API void tibdgStatement_SetDateTime | ( | tibEx | e, |
tibdgStatement | statement, | ||
tibint32_t | parameterIndex, | ||
const tibDateTime * | dt | ||
) |
Sets a datetime value to a parameter number in a statement object.
Copies the datetime parameter so that the program is allowed to free or modify it after the function returns.
Note that parameter numbers start from 1. Setting the same parameter number multiple times is allowed, even with different types, as long as when ExecuteQuery is called all parameters are set and have the correct types.
e | The exception object captures information about failures. |
statement | The statement from which to bind the value. |
parameterIndex | The parameter number to set. |
dt | The datetime value to set into the statement. |
TIBDG_API void tibdgStatement_SetDouble | ( | tibEx | e, |
tibdgStatement | statement, | ||
tibint32_t | parameterIndex, | ||
tibdouble_t | dvalue | ||
) |
Sets a double value to a parameter number in a statement object.
Note that parameter numbers start from 1. Setting the same parameter number multiple times is allowed, even with different types, as long as when ExecuteQuery is called all parameters are set and have the correct types.
e | The exception object captures information about failures. |
statement | The statement from which to bind the value. |
parameterIndex | The parameter number to set. |
dvalue | The double value to set into the statement. |
TIBDG_API void tibdgStatement_SetLong | ( | tibEx | e, |
tibdgStatement | statement, | ||
tibint32_t | parameterIndex, | ||
tibint64_t | lvalue | ||
) |
Sets a long value to a parameter number in a statement object.
Note that parameter numbers start from 1. Setting the same parameter number multiple times is allowed, even with different types, as long as when ExecuteQuery is called all parameters are set and have the correct types.
e | The exception object captures information about failures. |
statement | The statement from which to bind the value. |
parameterIndex | The parameter number to set. |
lvalue | The long value to set into the statement. |
TIBDG_API void tibdgStatement_SetNull | ( | tibEx | e, |
tibdgStatement | statement, | ||
tibint32_t | parameterIndex | ||
) |
Sets an empty value for a parameter number in a statement object.
Note that parameter numbers start from 1. Setting the same parameter number multiple times is allowed, even with different types, as long as when ExecuteQuery is called all parameters are set and have the correct types.
e | The exception object captures information about failures. |
statement | The statement containing the parameter. |
parameterIndex | The parameter number to set. |
TIBDG_API void tibdgStatement_SetOpaque | ( | tibEx | e, |
tibdgStatement | statement, | ||
tibint32_t | parameterIndex, | ||
const void * | ovalue, | ||
tibint32_t | size | ||
) |
Sets an opaque value to a parameter number in a statement object.
Copies the opaque parameter so that the program is allowed to free or modify it after the function returns.
Note that parameter numbers start from 1. Setting the same parameter number multiple times is allowed, even with different types, as long as when ExecuteQuery is called all parameters are set and have the correct types.
e | The exception object captures information about failures. |
statement | The statement from which to bind the value. |
parameterIndex | The parameter number to set. |
ovalue | The opaque value to set into the statement. |
size | The size of the opaque in bytes. |
TIBDG_API void tibdgStatement_SetString | ( | tibEx | e, |
tibdgStatement | statement, | ||
tibint32_t | parameterIndex, | ||
const char * | svalue | ||
) |
Sets a string value to a parameter number in a statement object.
Copies the string parameter so that the program is allowed to free or modify it after the function returns.
Note that parameter numbers start from 1. Setting the same parameter number multiple times is allowed, even with different types, as long as when ExecuteQuery is called all parameters are set and have the correct types.
e | The exception object captures information about failures. |
statement | The statement from which to bind the value. |
parameterIndex | The parameter number to set. |
svalue | The string value to set into the statement. |