Hi!

I'm trying to run the code snippet (see at the end) from "la
clojure"'s (IntelliJ 10.0.2) REPL but it fails with the error:

"java.sql.SQLException: JZ006: Caught IOException:
java.net.SocketException: Unrecognized Windows Sockets error: 10106:
create (test.clj:3)."

The driver's library (jConn3.jar) is in the classpath.

To see if it works at all I checked the jdbc connection string using a
java program with netbeans and it works perfectly fine. I can do
select's and retrieve the rows.

I gave it another try and ran the code via the REPL and clojure
package that ships with Stuart's "Programming Clojure" and that was
success!

So I think there is a problem with my  "la clojure"  REPL. Looks like
it does not allow me to establish a tcp/ip connection?

Any ideas?

- finbeu

=====================
(use 'clojure.contrib.sql)

(def db {:classname "com.sybase.jdbc3.jdbc.SybDriver" ; must be in
classpath
           :subprotocol "sybase:Tds"
           :subname "sybsrv01:4100"
           ; Any additional keys are passed to the driver
           ; as driver-specific properties.
           :user "test"
           :password "test12"})

(with-connection db
   (with-query-results rs ["select * from external_accounts"]
     (dorun (map #(println (:portfolio_id %)) rs))))
======================



-- 
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