2002-01-24 12:34:10 +00:00
|
|
|
/* MDB Tools - A library for reading MS Access database file
|
|
|
|
|
* Copyright (C) 2000 Brian Bruns
|
|
|
|
|
*
|
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* Library General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
2013-07-04 13:50:33 +02:00
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2002-01-24 12:34:10 +00:00
|
|
|
*/
|
2013-07-04 10:53:13 +02:00
|
|
|
|
2002-01-24 12:34:10 +00:00
|
|
|
#ifndef _mdbodbc_h_
|
|
|
|
|
#define _mdbodbc_h_
|
|
|
|
|
|
2004-03-04 21:25:09 +00:00
|
|
|
#include <sql.h>
|
|
|
|
|
#include <sqlext.h>
|
2004-10-16 14:21:13 +00:00
|
|
|
#if defined(UNIXODBC)
|
|
|
|
|
# include <odbcinst.h>
|
|
|
|
|
#elif defined(IODBC)
|
|
|
|
|
# include <iodbcinst.h>
|
2004-03-04 21:25:09 +00:00
|
|
|
#endif
|
|
|
|
|
|
2013-07-04 10:53:13 +02:00
|
|
|
#include "mdbtools.h"
|
|
|
|
|
#include "mdbsql.h"
|
2013-07-03 13:39:08 +02:00
|
|
|
#include "connectparams.h"
|
2004-03-04 21:25:09 +00:00
|
|
|
|
2002-01-24 12:34:10 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
struct _henv {
|
2013-07-03 19:32:53 +02:00
|
|
|
MdbSQL *sql;
|
|
|
|
|
GPtrArray *connections;
|
2002-01-24 12:34:10 +00:00
|
|
|
};
|
|
|
|
|
struct _hdbc {
|
|
|
|
|
struct _henv *henv;
|
2013-07-03 13:39:08 +02:00
|
|
|
ConnectParams* params;
|
2013-07-03 19:32:53 +02:00
|
|
|
GPtrArray *statements;
|
2002-01-24 12:34:10 +00:00
|
|
|
};
|
|
|
|
|
struct _hstmt {
|
|
|
|
|
struct _hdbc *hdbc;
|
|
|
|
|
/* reminder to self: the following is here for testing purposes.
|
|
|
|
|
* please make dynamic before checking in
|
|
|
|
|
*/
|
|
|
|
|
char query[4096];
|
|
|
|
|
struct _sql_bind_info *bind_head;
|
2002-04-09 01:18:16 +00:00
|
|
|
int rows_affected;
|
2011-09-04 17:16:47 -04:00
|
|
|
int icol; /* SQLGetData: last column */
|
|
|
|
|
int pos; /* SQLGetData: last position (truncated result) */
|
2002-01-24 12:34:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct _sql_bind_info {
|
|
|
|
|
int column_number;
|
|
|
|
|
int column_bindtype;
|
|
|
|
|
int column_bindlen;
|
2002-04-09 01:18:16 +00:00
|
|
|
int *column_lenbind;
|
2002-01-24 12:34:10 +00:00
|
|
|
char *varaddr;
|
|
|
|
|
struct _sql_bind_info *next;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|