Hi,

i've been wanting to play with clojureql for a while and now it seems i'm
pretty much stuck at the entry point...

a simple example:

; set up includes, db connection info etc
(require '[dk.bestinclass.clojureql :as cql])
(cql/load-driver "com.mysql.jdbc.Driver")
(def *connection* (cql/make-connection-info "mysql" "//path_to/db" "user"
"password"))


so far so good. let's assume i have a table baned people and want to fetch
the first five entries:

user=> (cql/run [*connection* result] (cql/query * people) (take 5 result))
java.sql.SQLException: Operation not allowed after ResultSet closed


this is kind of unexpected... interestingly, the following works just fine:


(cql/run [*connection* result] (cql/query * people) (dosync (println (take 5
result))))

... prints 5 people...

The ResultSet always seems to be closed unless i print it right away... what
am i doing wrong?

cheers,

-Max

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to