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

From Linuxnetworks
< OpenDBX‎ | C API
Jump to: navigation, search
 
(28 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
'''Send a statement to the database server'''
  
  int odbx_query(
+
  #include <opendbx/api.h>
    odbx_t* handle,
+
    const char* query,
+
    unsigned long length )
+
  
= Description: =
+
int '''odbx_query'''(
 +
    odbx_t* '''''handle''''',
 +
    const char* '''''stmt''''',
 +
    unsigned long '''''length''''' )
  
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.
+
== Description ==
  
= Parameters: =
+
Sends the given statement to the database server associated to '''''handle''''' by [[OpenDBX/API/odbx_init|odbx_init]]() for execution. The statement can contain non-displayable characters as arguments in conditions but they have to be escaped via [[OpenDBX/API/odbx_escape|odbx_escape]]() before adding them to the statement. Even more, every argument whose source is not controlled by the programmer must be escaped first to avoid SQL injection attacks to avoid serious harm!
  
* handle: Connection object created by odbx_init()
+
After invoking [[OpenDBX/API/odbx_query|odbx_query]](), one or more result sets will be sent back by the server and are available via [[OpenDBX/API/odbx_result|odbx_result]](). Before these sets aren't processed by calling [[OpenDBX/API/odbx_row_fetch|odbx_row_fetch]](), no other queries can be sent to the database server. Otherwise, [[OpenDBX/API/odbx_query|odbx_query]]() will return a backend error from the native database library.
* query: Statement string
+
* length: Length of the query string without the terminating \0 character
+
  
= Return values: =
+
The first parameter '''''handle''''' is the connection object created and returned by [[OpenDBX/API/odbx_init|odbx_init]]() which becomes invalid as soon as it was supplied to [[OpenDBX/API/odbx_finish|odbx_finish]]().
  
* Zero on success
+
The statement stored in the '''''stmt''''' parameter must be a valid statement understood by the receiving database server and it should be terminated by a \0 character. Some backends support multiple statements per query, which can be tested by calling [[OpenDBX/API/odbx_get_option|odbx_get_option]]().
* Non-zero if an error occured
+
  
= Errors: =
+
The '''''length''''' parameter must contain the length of the statement in bytes without the terminating \0 character. If variable sized character sets like UTF-8 are used, the same rule applies. This function doesn't support the wide character type (wchar_t) which uses two or four bytes per character. If you feed 0 (zero) as '''''length''''' parameter to the function, it will calculate the size of the statement on its own.
  
* -ODBX_ERR_PARAM: One of the parameters or its content is invalid
+
== Return value ==
* -ODBX_ERR_NOMEM: Allocating new memory failed
+
* -1: Any error retured by the backend
+
  
 +
[[OpenDBX/API/odbx_query|odbx_query]]() returns ODBX_ERR_SUCCESS, or an error code whose value is less than zero if one of the operations couldn't be completed successfully. Possible error codes are listed in the error section and they can be feed to [[OpenDBX/API/odbx_error|odbx_error]]() and [[OpenDBX/API/odbx_error_type|odbx_error_type]]() to get further details.
  
----
+
== Errors ==
Back to [[OpenDBX API|Overview]]
+
  
 +
; -ODBX_ERR_BACKEND : The native database library returned an error because it wasn't able to handle the statement correctly
 +
; -ODBX_ERR_PARAM : Either '''''handle''''' or '''''stmt''''' are NULL or '''''handle''''' is invalid
 +
; -ODBX_ERR_NOMEM : Allocating the required memory for the statement failed
  
.
+
== See also ==
  
 
+
* [[OpenDBX/API/odbx_error|odbx_error]]()
 
+
* [[OpenDBX/API/odbx_error_type|odbx_error_type]]()
 
+
* [[OpenDBX/API/odbx_escape|odbx_escape]]()
 
+
* [[OpenDBX/API/odbx_result|odbx_result]]()
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
<div id="kbektt12150" style="overflow:auto;height:1px;">
+
[http://www.gayhomes.net/moiseev/casino_poker.html casino]
+
[http://www.gayhomes.net/moiseev/casino_morongo.html casino]
+
[http://www.gayhomes.net/moiseev/viagra_prescription.html viagra prescription]
+
[http://mujweb.cz/www/buyonline/prevacid.html prevacid]
+
[http://www.gayhomes.net/dermo/acyclovir.html acyclovir]
+
[http://www.gayhomes.net/moiseev/casino_gambling.html casino]
+
[http://www.gayhomes.net/moiseev/atlantic_city_casino.html casino]
+
[http://www.gayhomes.net/debil/cyclobenzaprine.html cyclobenzaprine]
+
[http://www.gayhomes.net/moiseev/discount_viagra.html discount viagra]
+
[http://www.gayhomes.net/moiseev/casino_baccarat.html casino]
+
[http://mujweb.cz/Zabava/buycheap/phentermine.html phentermine]
+
[http://www.gayhomes.net/moiseev/grand_casino.html casino]
+
[http://www.gayhomes.net/dermo/buspar.html buspar]
+
[http://www.gayhomes.net/moiseev/louisiana_casino.html casino]
+
[http://buy-phentermine-online.ze.cx/ buy phentermine]
+
[http://mujweb.cz/www/buyonline/clarinex.html clarinex]
+
[http://mujweb.cz/Zabava/buycheap/meridia.html meridia]
+
[http://www.gayhomes.net/dermo/zithromax.html zithromax]
+
[http://www.gayhomes.net/jopotrah/phentermine_diet.html phentermine diet]
+
[http://www.gayhomes.net/moiseev/caesar_palace_hotel_and_casino.html casino]
+
[http://mujweb.cz/Zabava/buycheap/viagra.html viagra]
+
[http://www.gayhomes.net/moiseev/casino.html casino]
+
[http://www.gayhomes.net/dermo/sildenafil.html sildenafil]
+
[http://mujweb.cz/www/buyonline/norvasc.html norvasc]
+
[http://www.gayhomes.net/moiseev/top_online_casino.html casino]
+
[http://www.gayhomes.net/debil/remeron.html remeron]
+
[http://www.gayhomes.net/moiseev/casino_money.html casino]
+
[http://mujweb.cz/www/buyonline/fluoxetine.html fluoxetine]
+
[http://buy-phentermine-online.fr.nf/ buy phentermine]
+
[http://mujweb.cz/Zabava/buycheap/xanax.html xanax]
+
[http://www.gayhomes.net/moiseev/home_casino.html casino]
+
[http://mujweb.cz/Zabava/buycheap/cialis.html cialis]
+
[http://www.gayhomes.net/moiseev/fallsview_casino.html casino]
+
[http://www.gayhomes.net/moiseev/online_casino_game.html casino]
+
[http://www.gayhomes.net/moiseev/free_online_casino_game.html casino]
+
[http://mujweb.cz/www/buyonline/zovirax.html zovirax]
+
[http://mujweb.cz/Zabava/buycheap/fioricet.html fioricet]
+
[http://www.gayhomes.net/moiseev/free_casino_game.html casino]
+
[http://mujweb.cz/www/buyonline/fosamax.html fosamax]
+
[http://www.gayhomes.net/moiseev/casino_slot.html casino]
+
[http://mujweb.cz/Zabava/buycheap/lorazepam.html lorazepam]
+
[http://www.gayhomes.net/debil/fluoxetine.html fluoxetine]
+
[http://www.gayhomes.net/dermo/valtrex.html valtrex]
+
[http://www.gayhomes.net/moiseev/casino_rama.html casino]
+
[http://www.gayhomes.net/moiseev/casino_windsor.html casino]
+
[http://www.gayhomes.net/debil/butalbital.html butalbital]
+
[http://www.gayhomes.net/moiseev/ameristar_casino.html casino]
+
[http://www.gayhomes.net/moiseev/map.html map]
+
[http://www.gayhomes.net/debil/amoxicillin.html amoxicillin]
+
[http://buy-viagra-online.fr.nf/ buy viagra]
+
[http://www.gayhomes.net/moiseev/casino_strategy.html casino]
+
[http://www.gayhomes.net/moiseev/aladdin_casino.html casino]
+
[http://www.gayhomes.net/moiseev/isle_of_capri_casino.html casino]
+
[http://www.gayhomes.net/moiseev/best_online_casino_directory.html casino]
+
[http://www.gayhomes.net/moiseev/casino_on_line.html casino]
+
[http://mujweb.cz/Zabava/buycheap/valium.html valium]
+
[http://www.gayhomes.net/moiseev/free_online_casino.html casino]
+
[http://www.gayhomes.net/moiseev/online_casino_review.html casino]
+
[http://www.gayhomes.net/jopotrah/order_phentermine_online.html order phentermine]
+
[http://www.gayhomes.net/moiseev/no_deposit_casino.html casino]
+
[http://www.gayhomes.net/moiseev/casino_gamble.html casino]
+
[http://www.gayhomes.net/moiseev/casino_royale.html casino]
+
[http://www.gayhomes.net/moiseev/casino_gaming.html casino]
+
[http://mujweb.cz/www/buyonline/remeron.html remeron]
+
[http://mujweb.cz/www/buyonline/ultracet.html ultracet]
+
[http://mujweb.cz/www/buyonline/alesse.html alesse]
+
[http://www.gayhomes.net/moiseev/real_casino.html casino]
+
[http://mujweb.cz/www/buyonline/tetracycline.html tetracycline]
+
[http://www.gayhomes.net/moiseev/internet_casino_gambling_online.html casino]
+
[http://www.gayhomes.net/moiseev/buy_viagra.html buy viagra]
+
[http://mujweb.cz/Zabava/buycheap/propecia.html propecia]
+
[http://www.gayhomes.net/moiseev/internet_casino.html casino]
+
[http://mujweb.cz/www/buyonline/aldara.html aldara]
+
[http://www.gayhomes.net/dermo/claritin.html claritin]
+
[http://www.gayhomes.net/moiseev/hollywood_casino.html casino]
+
[http://www.gayhomes.net/moiseev/reno_casino.html casino]
+
[http://mujweb.cz/Zabava/buycheap/carisoprodol.html carisoprodol]
+
[http://mujweb.cz/www/buyonline/motrin.html motrin]
+
[http://www.gayhomes.net/moiseev/casino_player.html casino]
+
[http://www.gayhomes.net/moiseev/vegas_casino.html casino]
+
[http://mujweb.cz/www/buyonline/cyclobenzaprine.html cyclobenzaprine]
+
[http://www.gayhomes.net/moiseev/generic_viagra.html generic viagra]
+
[http://www.gayhomes.net/moiseev/turning_stone_casino.html casino]
+
[http://www.gayhomes.net/debil/norvasc.html norvasc]
+
[http://mujweb.cz/www/buyonline/elavil.html elavil]
+
[http://www.gayhomes.net/moiseev/winstar_casino.html casino]
+
[http://mujweb.cz/www/buyonline/amoxicillin.html amoxicillin]
+
[http://buyadipexonline.blogspirit.com/ buy adipex]
+
[http://mujweb.cz/Zabava/buycheap/tramadol.html tramadol]
+
[http://www.comunalia.com/berty/ alprazolam]
+
[http://www.gayhomes.net/moiseev/casino_links.html casino]
+
[http://mujweb.cz/www/buyonline/zyban.html zyban]
+
[http://www.gayhomes.net/moiseev/casino_chips.html casino]
+
[http://phentermine-pharmacy.fr.nf/ phentermine pharmacy]
+
[http://www.gayhomes.net/dermo/celebrex.html celebrex]
+
[http://www.gayhomes.net/debil/aldara.html aldara]
+
[http://www.gayhomes.net/moiseev/viagra_pill.html viagra pill]
+
[http://www.gayhomes.net/dermo/yasmin.html yasmin]
+
[http://mujweb.cz/www/buyonline/estradiol.html estradiol]
+
[http://www.gayhomes.net/moiseev/order_viagra.html order viagra]
+
[http://www.gayhomes.net/moiseev/best_online_casino_gambling.html casino]
+
[http://www.gayhomes.net/moiseev/viagra_erection.html viagra erection]
+
[http://www.gayhomes.net/jopotrah/phentermine_adipex.html phentermine adipex]
+
[http://mujweb.cz/Zabava/buycheap/soma.html soma]
+
[http://www.gayhomes.net/moiseev/tropicana_casino.html casino]
+
[http://www.gayhomes.net/moiseev/hooters_casino.html casino]
+
[http://www.gayhomes.net/moiseev/best_casino.html casino]
+
[http://www.gayhomes.net/debil/prevacid.html prevacid]
+
[http://www.gayhomes.net/debil/seasonale.html seasonale]
+
[http://buy-fioricet-online.ze.cx/ buy fioricet]
+
[http://www.gayhomes.net/moiseev/las_vegas_hotel_casino.html casino]
+
[http://www.gayhomes.net/moiseev/virtual_casino.html casino]
+
[http://www.gayhomes.net/moiseev/internet_casino_gambling.html casino]
+
[http://www.gayhomes.net/moiseev/casino_arizona.html casino]
+
[http://www.gayhomes.net/debil/allegra.html allegra]
+
[http://www.gayhomes.net/moiseev/buy_viagra_online.html buy viagra online]
+
[http://www.gayhomes.net/moiseev/casino_niagara.html casino]
+
[http://buy-phentermine.fr.nf/ buy phentermine]
+
[http://www.gayhomes.net/jopotrah/order_phentermine.html order phentermine]
+
[http://www.gayhomes.net/dermo/effexor.html effexor]
+
[http://mujweb.cz/Zabava/buycheap/ambien.html ambien]
+
[http://www.gayhomes.net/dermo/renova.html renova]
+
[http://www.gayhomes.net/dermo/imitrex.html imitrex]
+
[http://www.gayhomes.net/moiseev/casino_hotel.html casino]
+
[http://www.gayhomes.net/jopotrah/phentermine_diet_pill.html phentermine diet pill]
+
[http://www.gayhomes.net/moiseev/casino_fun.html casino]
+
[http://www.gayhomes.net/moiseev/online_casino_directory.html casino]
+
[http://phentermine-information.ze.cx/ phentermine information]
+
[http://www.gayhomes.net/moiseev/pechanga_casino.html casino]
+
[http://www.gayhomes.net/moiseev/mississippi_casino.html casino]
+
[http://mujweb.cz/www/buyonline/flexeril.html flexeril]
+
[http://www.gayhomes.net/moiseev/viagra_online.html viagra online]
+
[http://www.gayhomes.net/moiseev/casino_on_net.html casino]
+
[http://www.gayhomes.net/moiseev/paris_casino_vegas.html casino]
+
[http://www.gayhomes.net/moiseev/casino_black_jack.html casino]
+
[http://www.gayhomes.net/debil/aciphex.html aciphex]
+
[http://mujweb.cz/Zabava/buycheap/alprazolam.html alprazolam]
+
[http://www.gayhomes.net/moiseev/casino_bonus.html casino]
+
[http://www.gayhomes.net/moiseev/viagra.html viagra]
+
[http://www.gayhomes.net/dermo/tadalafil.html tadalafil]
+
[http://www.gayhomes.net/moiseev/palm_casino.html casino]
+
[http://www.gayhomes.net/moiseev/soaring_eagle_casino.html casino]
+
[http://www.gayhomes.net/moiseev/harrahs_casino.html casino]
+
[http://www.gayhomes.net/moiseev/casino_roulette.html casino]
+
[http://www.gayhomes.net/jopotrah/buy_phentermine_online.html buy phentermine]
+
[http://www.gayhomes.net/moiseev/cheap_viagra.html cheap viagra]
+
[http://www.gayhomes.net/moiseev/casino_sport_book.html casino]
+
[http://www.gayhomes.net/moiseev/pala_casino.html casino]
+
[http://www.gayhomes.net/moiseev/indian_casino.html casino]
+
[http://www.gayhomes.net/moiseev/viagra_alternative.html viagra alternative]
+
[http://www.gayhomes.net/moiseev/venetian_casino.html casino]
+
[http://www.gayhomes.net/moiseev/indiana_casino.html casino]
+
[http://www.gayhomes.net/moiseev/casino_cash.html casino]
+
[http://www.gayhomes.net/dermo/prozac.html prozac]
+
[http://www.gayhomes.net/dermo/celexa.html celexa]
+
[http://www.gayhomes.net/moiseev/online_casino_gambling.html casino]
+
[http://www.gayhomes.net/dermo/lexapro.html lexapro]
+
[http://mujweb.cz/www/buyonline/ortho.html ortho]
+
[http://buy-levitra-online.fr.nf/ buy levitra]
+
[http://www.gayhomes.net/moiseev/online_gambling_casino.html casino]
+
[http://www.gayhomes.net/jopotrah/phentermine_online.html phentermine online]
+
[http://www.gayhomes.net/moiseev/las_vegas_casino.html casino]
+
[http://buy-soma-online.biz.st/ buy soma online]
+
[http://www.gayhomes.net/moiseev/golden_palace_casino.html casino]
+
[http://www.gayhomes.net/moiseev/vegas_tower_casino.html casino]
+
[http://www.gayhomes.net/debil/zovirax.html zovirax]
+
[http://www.gayhomes.net/moiseev/casino_guide.html casino]
+
[http://www.gayhomes.net/debil/estradiol.html estradiol]
+
[http://mujweb.cz/Zabava/buycheap/ultram.html ultram]
+
[http://www.gayhomes.net/moiseev/horseshoe_casino.html casino]
+
[http://www.gayhomes.net/jopotrah/phentermine_prescription.html phentermine prescription]
+
[http://www.gayhomes.net/debil/fosamax.html fosamax]
+
[http://www.gayhomes.net/moiseev/station_casino.html casino]
+
[http://mujweb.cz/www/buyonline/aciphex.html aciphex]
+
[http://phentermine55.fr.nf/ phentermine]
+
[http://buy-cialis-online.ze.cx/ buy cialis]
+
[http://www.gayhomes.net/dermo/zyrtec.html zyrtec]
+
[http://mujweb.cz/www/buyonline/butalbital.html butalbital]
+
[http://www.gayhomes.net/dermo/flonase.html flonase]
+
[http://www.gayhomes.net/dermo/wellbutrin.html wellbutrin]
+
[http://www.gayhomes.net/moiseev/hard_rock_casino.html casino]
+
[http://www.gayhomes.net/dermo/lamisil.html lamisil]
+
[http://www.gayhomes.net/debil/tetracycline.html tetracycline]
+
[http://www.gayhomes.net/jopotrah/phentermine_information.html phentermine information]
+
[http://mujweb.cz/Zabava/buycheap/levitra.html levitra]
+
[http://www.gayhomes.net/debil/zyban.html zyban]
+
[http://www.gayhomes.net/moiseev/casino_download.html casino]
+
[http://mujweb.cz/www/buyonline/seasonale.html seasonale]
+
[http://www.gayhomes.net/dermo/prilosec.html prilosec]
+
[http://www.gayhomes.net/debil/ultracet.html ultracet]
+
[http://www.gayhomes.net/moiseev/casino_consultant.html casino]
+
[http://www.gayhomes.net/moiseev/order_viagra_online.html order viagra online]
+
[http://www.gayhomes.net/moiseev/best_online_casino.html casino]
+
[http://www.gayhomes.net/moiseev/casino_game.html casino]
+
[http://www.gayhomes.net/debil/clarinex.html clarinex]
+
[http://www.gayhomes.net/moiseev/casino_directory.html casino]
+
[http://www.gayhomes.net/moiseev/casino_on_the_net.html casino]
+
[http://www.gayhomes.net/moiseev/free_viagra.html free viagra]
+
[http://www.gayhomes.net/moiseev/aladdin_hotel_and_casino.html casino]
+
[http://buy-carisoprodol-online.xxl.st/ buy carisoprodol]
+
[http://www.gayhomes.net/moiseev/herbal_viagra.html herbal viagra]
+
[http://www.gayhomes.net/moiseev/mohegan_sun_casino.html casino]
+
[http://www.gayhomes.net/moiseev/argosy_casino.html casino]
+
[http://buy-propecia-online.infos.st/ buy propecia]
+
[http://www.gayhomes.net/jopotrah/phentermine_pharmacy.html phentermine pharmacy]
+
[http://www.gayhomes.net/jopotrah/buy_phentermine.html buy phentermine]
+
[http://www.gayhomes.net/moiseev/online_casino.html casino]
+
[http://www.gayhomes.net/dermo/zoloft.html zoloft]
+
[http://mujweb.cz/Zabava/buycheap/adipex.html adipex]
+
[http://mujweb.cz/Zabava/buycheap/didrex.html didrex]
+
[http://www.gayhomes.net/jopotrah/phentermine_pill.html phentermine pill]
+
[http://www.gayhomes.net/moiseev/jackpot_casino.html casino]
+
[http://www.gayhomes.net/debil/diflucan.html diflucan]
+
[http://www.gayhomes.net/debil/ortho.html ortho]
+
[http://buy-phentermine.biz.st/ buy phentermine]
+
[http://mujweb.cz/www/buyonline/allegra.html allegra]
+
[http://www.gayhomes.net/moiseev/10_best_online_casino.html casino]
+
[http://www.gayhomes.net/moiseev/foxwoods_casino.html casino]
+
[http://www.gayhomes.net/dermo/nexium.html nexium]
+
[http://www.gayhomes.net/moiseev/online_casino_bonus.html casino]
+
[http://www.gayhomes.net/dermo/xenical.html xenical]
+
[http://mujweb.cz/www/buyonline/diflucan.html diflucan]
+
[http://buy-tramadol-online.fr.nf/ buy tramadol]
+
[http://www.gayhomes.net/moiseev/free_casino.html casino]
+
[http://www.gayhomes.net/debil/flexeril.html flexeril]
+
[http://www.gayhomes.net/moiseev/play_casino.html casino]
+
[http://www.gayhomes.net/moiseev/casino_portal.html casino]
+
[http://www.gayhomes.net/jopotrah/cheap_phentermine.html cheap phentermine]
+
[http://www.gayhomes.net/debil/elavil.html elavil]
+
[http://www.gayhomes.net/jopotrah/phentermine.html phentermine]
+
[http://www.gayhomes.net/moiseev/lake_charles_casino.html casino]
+
[http://www.gayhomes.net/dermo/retin.html retin]
+
[http://www.gayhomes.net/moiseev/tunica_casino.html casino]
+
[http://www.gayhomes.net/debil/alesse.html alesse]
+
[http://www.gayhomes.net/jopotrah/phentermine_side_effects.html phentermine side effects]
+
[http://www.gayhomes.net/dermo/paxil.html paxil]
+
[http://mujweb.cz/Zabava/buycheap/clonazepam.html clonazepam]
+
[http://www.gayhomes.net/debil/motrin.html motrin]
+
[http://buyambienonline.blogspirit.com/ buy ambien]
+
</div>
+

Latest revision as of 23:13, 28 April 2009

Send a statement to the database server

#include <opendbx/api.h>
int odbx_query(
    odbx_t* handle,
    const char* stmt,
    unsigned long length )

Description

Sends the given statement to the database server associated to handle by odbx_init() for execution. The statement can contain non-displayable characters as arguments in conditions but they have to be escaped via odbx_escape() before adding them to the statement. Even more, every argument whose source is not controlled by the programmer must be escaped first to avoid SQL injection attacks to avoid serious harm!

After invoking odbx_query(), one or more result sets will be sent back by the server and are available via odbx_result(). Before these sets aren't processed by calling odbx_row_fetch(), no other queries can be sent to the database server. Otherwise, odbx_query() will return a backend error from the native database library.

The first parameter handle is the connection object created and returned by odbx_init() which becomes invalid as soon as it was supplied to odbx_finish().

The statement stored in the stmt parameter must be a valid statement understood by the receiving database server and it should be terminated by a \0 character. Some backends support multiple statements per query, which can be tested by calling odbx_get_option().

The length parameter must contain the length of the statement in bytes without the terminating \0 character. If variable sized character sets like UTF-8 are used, the same rule applies. This function doesn't support the wide character type (wchar_t) which uses two or four bytes per character. If you feed 0 (zero) as length parameter to the function, it will calculate the size of the statement on its own.

Return value

odbx_query() returns ODBX_ERR_SUCCESS, or an error code whose value is less than zero if one of the operations couldn't be completed successfully. Possible error codes are listed in the error section and they can be feed to odbx_error() and odbx_error_type() to get further details.

Errors

-ODBX_ERR_BACKEND 
The native database library returned an error because it wasn't able to handle the statement correctly
-ODBX_ERR_PARAM 
Either handle or stmt are NULL or handle is invalid
-ODBX_ERR_NOMEM 
Allocating the required memory for the statement failed

See also