Difference between revisions of "OpenDBX/C API/odbx query"
From Linuxnetworks
(→Description:) |
(see also) |
||
Line 28: | Line 28: | ||
* -ODBX_ERR_PARAM: "handle" or query string are NULL or the structure is invalid | * -ODBX_ERR_PARAM: "handle" or query string are NULL or the structure is invalid | ||
* -ODBX_ERR_NOMEM: Allocating new memory failed | * -ODBX_ERR_NOMEM: Allocating new memory failed | ||
+ | |||
+ | = See also: = | ||
+ | |||
+ | * [[OpenDBX_error]] | ||
+ | * [[OpenDBX_error_type]] | ||
+ | * [[OpenDBX_result]] | ||
---- | ---- | ||
Back to [[OpenDBX API|Overview]] | Back to [[OpenDBX API|Overview]] |
Revision as of 11:45, 13 February 2007
int odbx_query( odbx_t* handle, const char* query, unsigned long length )
Description:
Sends a query string to the database server which must be terminated by a \0 character. Some backends support multiple statements per query, which can be tested by calling odbx_get_option().
After invoking odbx_query(), the results sent back by the server are available via the odbx_result() function.
Parameters:
- handle: Connection object created by odbx_init()
- query: String terminated by \0 consisting of one or more statements
- length: Length of the query string without the terminating \0 character
Return values:
- ODBX_ERR_SUCCESS on success
- Less than zero if an error occured
Errors:
- -ODBX_ERR_BACKEND: Any error returned by the backend
- -ODBX_ERR_PARAM: "handle" or query string are NULL or the structure is invalid
- -ODBX_ERR_NOMEM: Allocating new memory failed
See also:
Back to Overview