[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Assertion failed when trying to use ODBC in Windows 7 64 bit
- From: Patrick Rapin <toupie300@...>
- Date: Thu, 8 Mar 2012 12:06:07 +0100
The problem is not in Lua itself, so it is improbable that Lua 5.2
will fix the problem !
The file ls_odbc.c is part of luasql package.
Looking at the source on GitHub [1], line 163 effectively contains an
assert statement.
It is the "default" case of the following switch:
/*
** Returns the name of an equivalent lua type for a SQL type.
*/
static const char *sqltypetolua (const SQLSMALLINT type) {
switch (type) {
case SQL_UNKNOWN_TYPE: case SQL_CHAR: case SQL_VARCHAR:
case SQL_TYPE_DATE: case SQL_TYPE_TIME: case SQL_TYPE_TIMESTAMP:
case SQL_DATE: case SQL_INTERVAL: case SQL_TIMESTAMP:
case SQL_LONGVARCHAR:
return "string";
case SQL_BIGINT: case SQL_TINYINT: case SQL_NUMERIC:
case SQL_DECIMAL: case SQL_INTEGER: case SQL_SMALLINT:
case SQL_FLOAT: case SQL_REAL: case SQL_DOUBLE:
return "number";
case SQL_BINARY: case SQL_VARBINARY: case SQL_LONGVARBINARY:
return "binary"; /* !!!!!! nao seria string? */
case SQL_BIT:
return "boolean";
default:
assert(0);
return NULL;
}
}
But now, as I know nothing about luasql, I am unable to interpret the
error any further.
[1] https://github.com/keplerproject/luasql/blob/master/src/ls_odbc.c