AmigoNico (6) [Avatar] Offline
#1
I ran into some problems when using DataSet that were cleared up by this post:

http://www.javaworld.com/community/node/4117

It might be good to talk about some of the (significant!) limitations of DataSet -- in particular, these three:

"One of the limitations of the Groovy DataSet is that constants (numbers and literal strings) must be used in construction of the narrowing clauses. I often need my SQL/JDBC statements to be dynamically populated and in such cases the GroovySql is the better choice. Although Groovy DataSet supports inserts in addition to queries (see its add method), the DataSet does not support updates or deletes.

There is one final disadvantage of DataSet that is fairly well advertised. Code using the DataSet must be included on the classpath whether it is a script or a class."