00000 error while using Q odbc

I am connecting to oracle database using q as odbc client. When
executing the query, I getting the following error:

k){if[~x in h;'`invalid];$[@t:eval1y;+@[t;f@&{&/x=_x}'t
f@:&15h=@:'t f:!t:+t;
_:];t]}
'00000
@
code[80225088j]

The query works fine on toad (sql querying tool). The query that I am
using returns around 5MN rows. I tried running the same query by
restricting the number of rows returned to 2 but get the same error.
Any thoughts on how this error can be deciphered?

“code” means the error is happening inside a C function, presumably
from odbc.so. I’m not familiar with it, but it should be possible to
figure out what function is throwing the error (look for a 2: call in
odbc.k) then go find the relevant krr call/macro in
http://kx.com/q/c/c/odbc.c.