Difference between revisions of "OpenDBX/C API/odbx query"

From Linuxnetworks
< OpenDBX‎ | C API
Jump to: navigation, search
m (Reverted edit of 1146170355, changed back to last version by Nose)
(Description:)
Line 8: Line 8:
 
= Description: =
 
= Description: =
  
Sends a query statement to the database server. Some backends support multiple statement queries, which can be requested by odbx_get_option(). Each statement must be terminated by a semicolon and the complete query by a \0 character.  
+
Sends a query statement to the database server. Some backends support multiple statement queries, which can be tested by calling [[OpenDBX_get_option|odbx_get_option()]]. The query string must be terminated by a \0 character.
  
 
= Parameters: =
 
= Parameters: =

Revision as of 16:42, 5 June 2006


int odbx_query(
    odbx_t* handle,
    const char* query,
    unsigned long length )

Description:

Sends a query statement to the database server. Some backends support multiple statement queries, which can be tested by calling odbx_get_option(). The query string must be terminated by a \0 character.

Parameters:

  • handle: Connection object created by odbx_init()
  • query: Statement string
  • length: Length of the query string without the terminating \0 character

Return values:

  • Zero on success
  • Non-zero if an error occured

Errors:

  • -ODBX_ERR_PARAM: One of the parameters or its content is invalid
  • -ODBX_ERR_NOMEM: Allocating new memory failed
  • -1: Any error retured by the backend



Back to Overview