I believe your result set is closed by the time you execute your
statement. If you use (class (sel)) you will notice it is a resultset.

Start by executed your desired s-exp inside the macro at the REPL.
Then I would
use a let/map combination to turn it into a fn.

Hope this helps,
Sean

On Aug 18, 2:28 pm, shane <semmon...@gmail.com> wrote:
> I am trying to use the JDBC-ODBC with the following code:
>
> (use '[clojure.contrib.sql])
>
> (def db {:classname "sun.jdbc.odbc.JdbcOdbcDriver"
>          :subprotocol "odbc"
>          :subname "jdbc:odbc:D2D1"
>          :username "ERASUSR"
>          :password "REPORTS"})
>
> (defn sel []
>   (with-connection db
>     (with-query-results rs ["SELECT * FROM
> DB2PROD.ED0CDT_CYCLE_DATES"]
>       (map :CYCLE_IND rs))))
>
> When I execute (first (sel)) I receive the following error:
>
> java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source
> name not found and no default driver specified (NO_SOURCE_FILE:0)
>   [Thrown class clojure.lang.Compiler$CompilerException]
>
> I use this dsn (D2P1) in a number of other programs/languages with no
> problem. Can anyone spot something wrong?
--~--~---------~--~----~------------~-------~--~----~
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