Page 1 of 1

odbc_a error "COUNT field incorrect or syntax error" and workaround

Posted: 29.04.2021, 13:34
by mine1961
Hi,

I'm currently testing ZEOS 8.0 (r7517) with several sql servers. Looks really promising so far.
Using odbc_a and SQL Server driver [ODBC Driver 11 for SQL Server] or SQL Server native client an exception is thrown on a ZQuery.Post command (content in subject). I finally found that a bit field in a table caused this error. Passing the value as integer wouldn't fix it. I finally changed the data type in the DB from bit to int, and all was fine.

I also found an datetime error, when using field type time(0) or time(7). Internally the field was mapped to DB_WCHAR or similar and not time type and therefore raising an exception. I avoided the error by using a datetime type in the DB.

Are these already known errors.

Re: odbc_a error "COUNT field incorrect or syntax error" and workaround

Posted: 30.04.2021, 05:52
by EgonHugeist
Hi,

nope i'm fine with FieldType Bit on ODBC and OleDB. It should be mapped to a boolean field.
Note for MSSQL Server use ODBC_W this server isn't ansi based anymore since ages..

So can you explain the problem a bit more precise? Compiler, Server, Driver Versions should be a good start..