large sql statement causes a GPF

hi everyone!

i am dynamically constructing a large sql statement with an "IN" clause...
when the "IN" clause get's too big the sql actually GPF's the machine, has
anyone encountered a similar problem with large sql statments and if so is
there a way to avoid them?

note: i am using delphi 1.0 16-bit with the Borland Database Engine 2.5.

thanks for any help, mark