lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I tried using to_char() but got the same assertion failed error.
Here is my minimal dump: lua.dmp - http://dl.dropbox.com/u/43546099/lua.dmp

Some good news: I tried to select a simple numeric column and it worked! ("SELECT NUORDR FROM ZAU1"). Then I tried a DATE column too, and it worked again. It seems that I have problem with CHAR columns, unfortunately I have many of them.

Thanks again.


2012/3/9 Dimiter 'malkia' Stanev <malkia@gmail.com>
Maybe Ignacio is right. SQL_WCHAR is not handled by the lua wrapper, and it's possible that SOCDOS is WCHAR.

Can you change your SQL (assuming Oracle SQL):

FROM:   SELECT ZDEA.SOCDOS, ....
TO:     SELECT TO_CHAR(ZDEA.SOCDOS), ....

According to this TO_CHAR should be available:
http://psoug.org/reference/convert_func.html

Aat least to get it pass through the assert. Later you might have to convert it to a blob or binary and handle it some other way.

(Just guessing. I've only had experience with SQLite & MySQL, and through C#/C++ (not lua))


On 3/8/2012 1:45 PM, Szabó, Ferenc wrote:
@ Ignacio Burgueño:
SOCDOS is a simple char(3).
*

*
@ Dimiter 'malkia' Stanev:
I would do that. How could I print/log the actual code? I do not know C.
Shall I need a C compiler?

Actually the driver is 32 bit driver of DataDirect Connect for ODBC for
Oracle 8.1.6 (this version is not supported by Oracle for Windows 7) and
I have no support for the DataDirect driver yet as the support period is
already over. :(  (Pure me.)
So everything is identical except the OS that changed to 64 bit. I can
use the ODBC with other programs (eg. MS Office) without problem.