commit
061e8afb62
@ -32,11 +32,11 @@
|
||||
#define LUASQL_STATEMENT_ODBC "ODBC statement"
|
||||
#define LUASQL_CURSOR_ODBC "ODBC cursor"
|
||||
|
||||
/* holds data for paramter binding */
|
||||
/* holds data for parameter binding */
|
||||
typedef struct {
|
||||
SQLPOINTER buf;
|
||||
SQLINTEGER len;
|
||||
SQLINTEGER type;
|
||||
SQLLEN len;
|
||||
SQLLEN type;
|
||||
} param_data;
|
||||
|
||||
/* general form of the driver objects */
|
||||
@ -688,7 +688,7 @@ static int raw_execute(lua_State *L, int istmt)
|
||||
return create_cursor(L, -1, stmt, numcols);
|
||||
} else {
|
||||
/* if action has no results (e.g., UPDATE) */
|
||||
SQLINTEGER numrows;
|
||||
SQLLEN numrows;
|
||||
if(error(SQLRowCount(stmt->hstmt, &numrows))) {
|
||||
return fail(L, hSTMT, stmt->hstmt);
|
||||
}
|
||||
@ -700,7 +700,7 @@ static int raw_execute(lua_State *L, int istmt)
|
||||
|
||||
static int set_param(lua_State *L, stmt_data *stmt, int i, param_data *data)
|
||||
{
|
||||
static SQLINTEGER cbNull = SQL_NULL_DATA;
|
||||
static SQLLEN cbNull = SQL_NULL_DATA;
|
||||
|
||||
switch(lua_type(L, -1)) {
|
||||
case LUA_TNIL: {
|
||||
@ -777,7 +777,6 @@ static int set_param(lua_State *L, stmt_data *stmt, int i, param_data *data)
|
||||
*/
|
||||
static int raw_readparams_table(lua_State *L, stmt_data *stmt, int iparams)
|
||||
{
|
||||
static SQLINTEGER cbNull = SQL_NULL_DATA;
|
||||
SQLSMALLINT i;
|
||||
param_data *data;
|
||||
int res = 0;
|
||||
@ -805,7 +804,6 @@ static int raw_readparams_table(lua_State *L, stmt_data *stmt, int iparams)
|
||||
*/
|
||||
static int raw_readparams_args(lua_State *L, stmt_data *stmt, int arg, int ltop)
|
||||
{
|
||||
static SQLINTEGER cbNull = SQL_NULL_DATA;
|
||||
SQLSMALLINT i;
|
||||
param_data *data;
|
||||
int res = 0;
|
||||
@ -1116,9 +1114,9 @@ static int env_close (lua_State *L)
|
||||
env->closed = 1;
|
||||
ret = SQLFreeHandle (hENV, env->henv);
|
||||
if (error(ret)) {
|
||||
int ret = fail(L, hENV, env->henv);
|
||||
int ret2 = fail(L, hENV, env->henv);
|
||||
env->henv = NULL;
|
||||
return ret;
|
||||
return ret2;
|
||||
}
|
||||
return pass(L);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user