I copied the linked odbc.dll to my c:\Program Files (x86)\Lua\5.1\clibs\luasql\ directory. Then I started my Lua program and got another error:
"lua.exe - bad binary file / c:\Program Files (x86)\Lua\5.1\clibs\luasql\odbc.dll is not designed for Windows system or is erroneous..."
(in free translation into English).
This new odbc.dll is much less in size than the original one (20 kB vs. 98 kB):
2012.03.09. 13:35 20 153 odbc.dll
2007.10.29. 17:35 98 304 odbc.dll.orig
2012/3/9 Ignacio Burgueño
<ignaciob@inconcertcc.com>
Please, try this:
Backup your odbc.dll and replace it with this one. The assert should go away. This version handles SQL_WCHAR, SQL_WVARCHAR and SQL_WLONGVARCHAR. I needed to add them some time ago when dealing with nchar, nvarchar and ntext columns in SqlServer.