#ifndef DATABASE_ODBC_ODBC_BMX_RELEASE_WIN32_X86_H
#define DATABASE_ODBC_ODBC_BMX_RELEASE_WIN32_X86_H

#include <brl.mod/blitz.mod/.bmx/blitz.bmx.release.win32.x86.h>
#include <database.mod/core.mod/.bmx/core.bmx.release.win32.x86.h>
#include <brl.mod/stringbuilder.mod/.bmx/stringbuilder.bmx.release.win32.x86.h>
#include <pub.mod/stdc.mod/.bmx/stdc.bmx.release.win32.x86.h>
#include "common.bmx.release.win32.x86.h"
int __bb_database_odbc_odbc();
struct database_odbc_TODBCDatabaseLoader_obj;
struct database_odbc_TDBODBC_obj;
struct database_odbc_TODBCResultSet_obj;
void _database_odbc_TODBCDatabaseLoader_New(struct database_odbc_TODBCDatabaseLoader_obj* o);
typedef struct database_core_TDBConnection_obj* (*database_odbc_TODBCDatabaseLoader_LoadDatabase_SSiSSSS_m)(struct database_odbc_TODBCDatabaseLoader_obj*,BBSTRING,BBSTRING,BBINT,BBSTRING,BBSTRING,BBSTRING,BBSTRING);
struct database_core_TDBConnection_obj* _database_odbc_TODBCDatabaseLoader_LoadDatabase_SSiSSSS(struct database_odbc_TODBCDatabaseLoader_obj*,BBSTRING,BBSTRING,BBINT,BBSTRING,BBSTRING,BBSTRING,BBSTRING);
struct BBClass_database_odbc_TODBCDatabaseLoader {
	struct BBClass_database_core_TDatabaseLoader*  super;
	void      (*free)( BBObject *o );
	BBDebugScope* debug_scope;
	unsigned int instance_size;
	void      (*ctor)( BBOBJECT o );
	void      (*dtor)( BBOBJECT o );
	BBSTRING  (*ToString)( BBOBJECT x );
	int       (*Compare)( BBOBJECT x,BBOBJECT y );
	BBOBJECT  (*SendMessage)( BBOBJECT o,BBOBJECT m,BBOBJECT s );
	BBINTERFACETABLE itable;
	void*     extra;
	unsigned int obj_size;
	unsigned int instance_count;
	unsigned int fields_offset;
	database_odbc_TODBCDatabaseLoader_LoadDatabase_SSiSSSS_m m_LoadDatabase_SSiSSSS;
};

struct database_odbc_TODBCDatabaseLoader_obj {
	struct BBClass_database_odbc_TODBCDatabaseLoader* clas;
	BBSTRING _database_core_tdatabaseloader__type;
	struct database_core_TDatabaseLoader_obj* _database_core_tdatabaseloader__succ;
};
extern struct BBClass_database_odbc_TODBCDatabaseLoader database_odbc_TODBCDatabaseLoader;
void _database_odbc_TDBODBC_New(struct database_odbc_TDBODBC_obj* o);
void _database_odbc_TDBODBC_Delete(struct database_odbc_TDBODBC_obj* o);
typedef struct database_core_TDBConnection_obj* (*database_odbc_TDBODBC_Create_TTDBConnection_SSiSSSS_f)(BBSTRING,BBSTRING,BBINT,BBSTRING,BBSTRING,BBSTRING,BBSTRING);
struct database_core_TDBConnection_obj* database_odbc_TDBODBC_Create_TTDBConnection_SSiSSSS(BBSTRING,BBSTRING,BBINT,BBSTRING,BBSTRING,BBSTRING,BBSTRING);
typedef void (*database_odbc_TDBODBC_close_m)(struct database_odbc_TDBODBC_obj*);
void _database_odbc_TDBODBC_close(struct database_odbc_TDBODBC_obj*);
typedef BBINT (*database_odbc_TDBODBC_commit_m)(struct database_odbc_TDBODBC_obj*);
BBINT _database_odbc_TDBODBC_commit(struct database_odbc_TDBODBC_obj*);
typedef BBARRAY (*database_odbc_TDBODBC_getTables_m)(struct database_odbc_TDBODBC_obj*);
BBARRAY _database_odbc_TDBODBC_getTables(struct database_odbc_TDBODBC_obj*);
typedef struct database_core_TDBTable_obj* (*database_odbc_TDBODBC_getTableInfo_Si_m)(struct database_odbc_TDBODBC_obj*,BBSTRING,BBINT);
struct database_core_TDBTable_obj* _database_odbc_TDBODBC_getTableInfo_Si(struct database_odbc_TDBODBC_obj*,BBSTRING,BBINT);
typedef BBINT (*database_odbc_TDBODBC_open_SS_m)(struct database_odbc_TDBODBC_obj*,BBSTRING,BBSTRING);
BBINT _database_odbc_TDBODBC_open_SS(struct database_odbc_TDBODBC_obj*,BBSTRING,BBSTRING);
typedef BBINT (*database_odbc_TDBODBC_rollback_m)(struct database_odbc_TDBODBC_obj*);
BBINT _database_odbc_TDBODBC_rollback(struct database_odbc_TDBODBC_obj*);
typedef BBINT (*database_odbc_TDBODBC_startTransaction_m)(struct database_odbc_TDBODBC_obj*);
BBINT _database_odbc_TDBODBC_startTransaction(struct database_odbc_TDBODBC_obj*);
typedef BBBYTE* (*database_odbc_TDBODBC_databaseHandle_m)(struct database_odbc_TDBODBC_obj*);
BBBYTE* _database_odbc_TDBODBC_databaseHandle(struct database_odbc_TDBODBC_obj*);
typedef struct database_core_TQueryResultSet_obj* (*database_odbc_TDBODBC_createResultSet_m)(struct database_odbc_TDBODBC_obj*);
struct database_core_TQueryResultSet_obj* _database_odbc_TDBODBC_createResultSet(struct database_odbc_TDBODBC_obj*);
typedef BBSTRING (*database_odbc_TDBODBC_nativeErrorMessage_i_m)(struct database_odbc_TDBODBC_obj*,BBINT);
BBSTRING _database_odbc_TDBODBC_nativeErrorMessage_i(struct database_odbc_TDBODBC_obj*,BBINT);
typedef void (*database_odbc_TDBODBC_processError_iSipb_m)(struct database_odbc_TDBODBC_obj*,BBINT,BBSTRING,BBINT,BBBYTE*);
void _database_odbc_TDBODBC_processError_iSipb(struct database_odbc_TDBODBC_obj*,BBINT,BBSTRING,BBINT,BBBYTE*);
typedef BBINT (*database_odbc_TDBODBC_hasPrepareSupport_m)(struct database_odbc_TDBODBC_obj*);
BBINT _database_odbc_TDBODBC_hasPrepareSupport(struct database_odbc_TDBODBC_obj*);
typedef BBINT (*database_odbc_TDBODBC_hasTransactionSupport_m)(struct database_odbc_TDBODBC_obj*);
BBINT _database_odbc_TDBODBC_hasTransactionSupport(struct database_odbc_TDBODBC_obj*);
struct BBClass_database_odbc_TDBODBC {
	struct BBClass_database_core_TDBConnection*  super;
	void      (*free)( BBObject *o );
	BBDebugScope* debug_scope;
	unsigned int instance_size;
	void      (*ctor)( BBOBJECT o );
	void      (*dtor)( BBOBJECT o );
	BBSTRING  (*ToString)( BBOBJECT x );
	int       (*Compare)( BBOBJECT x,BBOBJECT y );
	BBOBJECT  (*SendMessage)( BBOBJECT o,BBOBJECT m,BBOBJECT s );
	BBINTERFACETABLE itable;
	void*     extra;
	unsigned int obj_size;
	unsigned int instance_count;
	unsigned int fields_offset;
	database_odbc_TDBODBC_Create_TTDBConnection_SSiSSSS_f f_Create_TTDBConnection_SSiSSSS;
	database_core_TDBConnection_Init_SSiSSSS_m m_Init_SSiSSSS;
	database_odbc_TDBODBC_close_m m_close;
	database_odbc_TDBODBC_commit_m m_commit;
	database_odbc_TDBODBC_getTables_m m_getTables;
	database_odbc_TDBODBC_getTableInfo_Si_m m_getTableInfo_Si;
	database_odbc_TDBODBC_open_SS_m m_open_SS;
	database_odbc_TDBODBC_rollback_m m_rollback;
	database_odbc_TDBODBC_startTransaction_m m_startTransaction;
	database_core_TDBConnection_executeQuery_S_m m_executeQuery_S;
	database_core_TDBConnection_isOpen_m m_isOpen;
	database_core_TDBConnection_getDatabaseName_m m_getDatabaseName;
	database_core_TDBConnection_getHost_m m_getHost;
	database_core_TDBConnection_getPortNumber_m m_getPortNumber;
	database_core_TDBConnection_error_m m_error;
	database_core_TDBConnection_resetError_m m_resetError;
	database_core_TDBConnection_hasError_m m_hasError;
	database_core_TDBConnection_setError_SSii_m m_setError_SSii;
	database_odbc_TDBODBC_databaseHandle_m m_databaseHandle;
	database_odbc_TDBODBC_createResultSet_m m_createResultSet;
	database_odbc_TDBODBC_nativeErrorMessage_i_m m_nativeErrorMessage_i;
	database_odbc_TDBODBC_hasPrepareSupport_m m_hasPrepareSupport;
	database_odbc_TDBODBC_hasTransactionSupport_m m_hasTransactionSupport;
	database_core_TDBConnection_free_m m_free;
	database_odbc_TDBODBC_processError_iSipb_m m_processError_iSipb;
};

struct database_odbc_TDBODBC_obj {
	struct BBClass_database_odbc_TDBODBC* clas;
	BBBYTE* _database_core_tdbconnection_handle;
	BBSTRING _database_core_tdbconnection__dbname;
	BBSTRING _database_core_tdbconnection__host;
	BBINT _database_core_tdbconnection__port;
	BBSTRING _database_core_tdbconnection__user;
	BBSTRING _database_core_tdbconnection__password;
	BBSTRING _database_core_tdbconnection__options;
	BBSTRING _database_core_tdbconnection__server;
	BBINT _database_core_tdbconnection__isopen;
	struct database_core_TDatabaseError_obj* _database_core_tdbconnection__lasterror;
	BBBYTE* _database_odbc_tdbodbc_envhandle;
};
extern struct BBClass_database_odbc_TDBODBC database_odbc_TDBODBC;
void _database_odbc_TODBCResultSet_New(struct database_odbc_TODBCResultSet_obj* o);
void _database_odbc_TODBCResultSet_Delete(struct database_odbc_TODBCResultSet_obj* o);
typedef struct database_core_TQueryResultSet_obj* (*database_odbc_TODBCResultSet_Create_TTQueryResultSet_TTDBConnectionS_f)(struct database_core_TDBConnection_obj*,BBSTRING);
struct database_core_TQueryResultSet_obj* database_odbc_TODBCResultSet_Create_TTQueryResultSet_TTDBConnectionS(struct database_core_TDBConnection_obj*,BBSTRING);
typedef BBINT (*database_odbc_TODBCResultSet_executeQuery_S_m)(struct database_odbc_TODBCResultSet_obj*,BBSTRING);
BBINT _database_odbc_TODBCResultSet_executeQuery_S(struct database_odbc_TODBCResultSet_obj*,BBSTRING);
typedef BBINT (*database_odbc_TODBCResultSet_prepare_S_m)(struct database_odbc_TODBCResultSet_obj*,BBSTRING);
BBINT _database_odbc_TODBCResultSet_prepare_S(struct database_odbc_TODBCResultSet_obj*,BBSTRING);
typedef BBINT (*database_odbc_TODBCResultSet_execute_m)(struct database_odbc_TODBCResultSet_obj*);
BBINT _database_odbc_TODBCResultSet_execute(struct database_odbc_TODBCResultSet_obj*);
typedef BBINT (*database_odbc_TODBCResultSet_firstRow_m)(struct database_odbc_TODBCResultSet_obj*);
BBINT _database_odbc_TODBCResultSet_firstRow(struct database_odbc_TODBCResultSet_obj*);
typedef BBINT (*database_odbc_TODBCResultSet_nextRow_m)(struct database_odbc_TODBCResultSet_obj*);
BBINT _database_odbc_TODBCResultSet_nextRow(struct database_odbc_TODBCResultSet_obj*);
typedef BBSTRING (*database_odbc_TODBCResultSet_getStringData_TTQueryFieldivi_m)(struct database_odbc_TODBCResultSet_obj*,struct database_core_TQueryField_obj*,BBINT,BBINT*);
BBSTRING _database_odbc_TODBCResultSet_getStringData_TTQueryFieldivi(struct database_odbc_TODBCResultSet_obj*,struct database_core_TQueryField_obj*,BBINT,BBINT*);
typedef BBLONG (*database_odbc_TODBCResultSet_lastInsertedId_m)(struct database_odbc_TODBCResultSet_obj*);
BBLONG _database_odbc_TODBCResultSet_lastInsertedId(struct database_odbc_TODBCResultSet_obj*);
typedef BBINT (*database_odbc_TODBCResultSet_rowsAffected_m)(struct database_odbc_TODBCResultSet_obj*);
BBINT _database_odbc_TODBCResultSet_rowsAffected(struct database_odbc_TODBCResultSet_obj*);
typedef BBINT (*database_odbc_TODBCResultSet_dbTypeFromNative_i_Sii_f)(BBSTRING,BBINT,BBINT);
BBINT database_odbc_TODBCResultSet_dbTypeFromNative_i_Sii(BBSTRING,BBINT,BBINT);
typedef void (*database_odbc_TODBCResultSet_initRecord_i_m)(struct database_odbc_TODBCResultSet_obj*,BBINT);
void _database_odbc_TODBCResultSet_initRecord_i(struct database_odbc_TODBCResultSet_obj*,BBINT);
struct BBClass_database_odbc_TODBCResultSet {
	struct BBClass_database_core_TQueryResultSet*  super;
	void      (*free)( BBObject *o );
	BBDebugScope* debug_scope;
	unsigned int instance_size;
	void      (*ctor)( BBOBJECT o );
	void      (*dtor)( BBOBJECT o );
	BBSTRING  (*ToString)( BBOBJECT x );
	int       (*Compare)( BBOBJECT x,BBOBJECT y );
	BBOBJECT  (*SendMessage)( BBOBJECT o,BBOBJECT m,BBOBJECT s );
	BBINTERFACETABLE itable;
	void*     extra;
	unsigned int obj_size;
	unsigned int instance_count;
	unsigned int fields_offset;
	database_odbc_TODBCResultSet_Create_TTQueryResultSet_TTDBConnectionS_f f_Create_TTQueryResultSet_TTDBConnectionS;
	database_core_TQueryResultSet_Init_TTDBConnectionS_m m_Init_TTDBConnectionS;
	database_core_TQueryResultSet_clearBindValues_m m_clearBindValues;
	database_core_TQueryResultSet_clear_m m_clear;
	database_odbc_TODBCResultSet_executeQuery_S_m m_executeQuery_S;
	database_odbc_TODBCResultSet_prepare_S_m m_prepare_S;
	database_odbc_TODBCResultSet_execute_m m_execute;
	database_odbc_TODBCResultSet_firstRow_m m_firstRow;
	database_odbc_TODBCResultSet_nextRow_m m_nextRow;
	database_odbc_TODBCResultSet_lastInsertedId_m m_lastInsertedId;
	database_odbc_TODBCResultSet_rowsAffected_m m_rowsAffected;
	database_odbc_TODBCResultSet_dbTypeFromNative_i_Sii_f f_dbTypeFromNative_i_Sii;
	database_core_TQueryResultSet_rowRecord_m m_rowRecord;
	database_core_TQueryResultSet_dataValue_i_m m_dataValue_i;
	database_core_TQueryResultSet_rowIndex_m m_rowIndex;
	database_core_TQueryResultSet_setRowIndex_i_m m_setRowIndex_i;
	database_core_TQueryResultSet_isActive_m m_isActive;
	database_core_TQueryResultSet_isValid_m m_isValid;
	database_core_TQueryResultSet_resetValues_i_m m_resetValues_i;
	database_core_TQueryResultSet_resetBindCount_m m_resetBindCount;
	database_core_TQueryResultSet_addBindValue_TTDBType_m m_addBindValue_TTDBType;
	database_core_TQueryResultSet_bindValue_iTTDBType_m m_bindValue_iTTDBType;
	database_core_TQueryResultSet_reset_m m_reset;
	database_core_TQueryResultSet_free_m m_free;
	database_odbc_TODBCResultSet_getStringData_TTQueryFieldivi_m m_getStringData_TTQueryFieldivi;
	database_odbc_TODBCResultSet_initRecord_i_m m_initRecord_i;
};

struct database_odbc_TODBCResultSet_obj {
	struct BBClass_database_odbc_TODBCResultSet* clas;
	struct database_core_TDBConnection_obj* _database_core_tqueryresultset_conn;
	BBBYTE* _database_core_tqueryresultset_stmthandle;
	BBSTRING _database_core_tqueryresultset_query;
	BBINT _database_core_tqueryresultset__isactive;
	BBINT _database_core_tqueryresultset_index;
	BBARRAY _database_core_tqueryresultset_values;
	BBINT _database_core_tqueryresultset_bindcount;
	BBARRAY _database_core_tqueryresultset_boundvalues;
	struct database_core_TQueryRecord_obj* _database_core_tqueryresultset_rec;
};
extern struct BBClass_database_odbc_TODBCResultSet database_odbc_TODBCResultSet;
BBINT database_odbc_isSQLError(BBINT bbt_result);

#endif
