Hi Tegan,

There may be other ways to solve your problem.

How much SQL are the users allowed to enter?  Perhaps it can be done
by using $value$ instead of #value# in critical places in an existing
sql map (This is how WHERE clauses in Abator-generated sql maps work
for the query-by-example bits).

Also, check if remapResults="true" would be applicable to your case.
Finally, if you do end up using $value$, be sure to escape the SQL
contained in the parameter [I use StringEscapeUtils.escapeSQL() in the
Apache Jakarta Commons Lang package].

Give us an example if you need more ideas.

Ted


On 02/03/07, Tegan Clark <[EMAIL PROTECTED]> wrote:
Hi all,

Does anyone have any pointers for how I would add a sql map to the
SqlMapClient at runtime.  I'm writing a GUI that lets a use enter a piece of
SQL and I'm using iBATIS to do the heavy lifting of mapping my java
parameters to the sql and executing it and doing the return mapping.

My only problem is getting the sql map to add dynamically.

All help appreciated.

Tegan

 ________________________________
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.


Reply via email to