lunarmodules / luasql

LuaSQL is a simple interface from Lua to a DBMS.
http://lunarmodules.github.io/luasql
535 stars 192 forks source link

Has anyone built odbc for x64? #115

Open nick-nh opened 4 years ago

nick-nh commented 4 years ago

Hello. I tried to make odbc driver for x64, but had LNK4272 x64-x86 problems (I did in x64 env). Tried to convert vs6 project, but vs2015 cannot do this.

nick-nh commented 4 years ago

I have compiled driver. I had to change in ls_odbc.c define to _WIN64 and SQLINTEGER to SQLLEN. Then it compiled wo warnings.

But when I tried to fetch cursor: cur:fetch({}, "a") got error without any message. Has anyone got similar in x64?

nick-nh commented 4 years ago

But it works if write iterator: function SQL_Rows(connection, sql_statement) local cursor = assert(connection:execute (sql_statement)) return function () return cursor:fetch() end end