Strings too long for prepare
Posted in 1994
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Naomi, I have had trouble with prepare accepting strings contained in host variables. Prepare fails at run-time if the string is longer than 256 char or if it contains embedded new-lines. These are variables, not quoted strings. To my knowledge, this is in both 4.0 and 5.0 ESQL/C. It could be that this is the 256 limit you found. If I know the command at compile time, I can use a normal ESQL command and I have no problems. But if I don't know enough until run-time and have to use prepare, then I start running into limitations. First, I have to use "prepare". Then, if I detected a field that I think is going to be a problem, I have to use "describe". And last, "execute using descriptor". This method has gotten me around every problem with prepare that I've run into so far. The rest of the system seems to be able to handle anything I throw at it. But prepare seems to be a bottleneck that keeps coming back to bite me.