A command text (I tried it with a dynamic SELECT statment) can't be longer then 65535 bytes. The parser seems to refill the first bytes of the buffer after this limit is reached (a command of length 65536 produces an error in line 1, column 1).
Sample SELECT statement: SELECT NULL, NULL, ...., NULL FROM <AnyTable>
It would be great if you can remove or extend this limit (maybe to 16M like MSSQL and Oracle)
Firebird 2.0 embedded was our first choice for an embedded solution besides MSSQL and Oracle, but this limitation prevents us from using firebird :-(
We are using an OR-mapping solution that produces quite long sql statements (if the query is complex ;-)