clojure.contrib.sql and SQL Server = cast exceptions?

2009-01-26 Thread BrianS
I have been able to connect up clojure and my SQL Server 2005 server, using the sample code include with clojure-contrib, at least in terms of connecting, and responding to command like CREATE TABLE and INSERT INTO. However, whenever I use the commands to access the tables and pull back results (

Re: clojure.contrib.sql and SQL Server = cast exceptions?

2009-01-26 Thread BrianS
et a stack trace   > from the most recent exception with: > >         (.printStackTrace *e) > > Thanks, > > --Steve > > On Jan 26, 2009, at 9:45 AM, BrianS wrote: > > > I have been able to connect up clojure and my SQL Server 2005 server, > > using the sam

Re: clojure.contrib.sql and SQL Server = cast exceptions?

2009-01-26 Thread BrianS
database? > > It would also be helpful if you can run this test under Java 6 because   > ClassCastExceptions in Java 6 mention the "from" and "to" types for   > the failed cast in the message for the exception. I'd like to see that. > > Thanks, > >

Re: clojure.contrib.sql and SQL Server = cast exceptions?

2009-01-29 Thread BrianS
> Brian S., > > You're quite welcome. I'm glad you're back in action. I'm going to add   > a check for the type of that argument to give a more helpful error   > message than "ClassCastException". > > --Steve > > On Jan 26, 2009, at 1:34 PM, BrianS

Re: clojure.contrib.sql and SQL Server = cast exceptions?

2009-01-30 Thread BrianS
t;Stephen C. Gilardi" wrote: > Hi Brian, > > On Jan 29, 2009, at 11:03 AM, BrianS wrote: > > >   Now that I am beginning to really investigate this cool part of the > > clojure-contrib library with SQL Server, I have hit the point where I > > would like to call par

Re: clojure.contrib.sql and inner joins

2009-02-04 Thread BrianS
Steve, Big apologies, I should have done just a little more investigating before posting. I serve as my team's DBA, so I should rightfully abhor the "SELECT * ", but that is what was causing the problem:duplicate column names in the returnset, as you said above. Once I substituted actual colum

clojure.contrib.sql and inner joins

2009-02-04 Thread BrianS
This may be a duplicate post, if so I apologize. I am having a problem while investigating the inner workings and capabilities of the clojure.contrib.sql class, specifically with the "inner join" syntax. I have a function that returns recordset maps that is taken directly from the test.clj file in

clojure and embedded derby

2009-02-17 Thread BrianS
Has anyone had experience creating clojure applications that use the embedded derby database driver? I am having an issue where I am unable to get the derby embedded database to shut down properly from within clojure. More specifically, whenever a java app accesses a derby embedded database, it c

Re: clojure and embedded derby

2009-02-18 Thread BrianS
t; it seems like the Derby lock file doesn't go away until the Clojure > > process terminates. > > > -Stuart Sierra > > > On Feb 17, 10:28 am, BrianS wrote: > > > Has anyone had experience creating clojure applications that use the > > > embedded de

Re: clojure and embedded derby

2009-02-19 Thread BrianS
workServerControl. (java.net.InetAddress/getByName "localhost") port)] (.start nsc nil))) as in: (start-network-server 1527) I use port 1527 and then I can connect to the same database in Netbeans database browser using this jdbc connection string: jdbc:derby://localhost:1527/MyDB HTH

Re: clojure and embedded derby

2009-02-20 Thread BrianS
One last question about clojure and derby: once I store a character large object type (CLOB), does anyone know of a best-practices way of converting it back into string from a resultset-seq for use in clojure processing? Thanks in advance for any help in this area. Brian --~--~-~--~~

Re: ANN: Pretty printer is now part of contrib

2009-04-07 Thread BrianS
I use clojure-contrib quite a bit, and I find a lot of value out of having the clj files in the JAR. First, I find it easier to debug a project, second there are example CLJ files in the source code on how to use the libraries, and those are of great interest, and it is much easier to get to these

Re: You know you've been writing too much Clojure when...

2009-06-04 Thread BrianS
You see a license plate in front of you DEFN1A3F and you wonder what the function 1A3F would return...happened to me the other day. On May 29, 2:51 pm, Paul Stadig wrote: > You meant to type disclosure, but instead you typed disclojure. > > Paul --~--~-~--~~~---~-

Error not bubbling up from clojure.contrib.sql insert-values function?

2009-06-05 Thread BrianS
We are seeing a strange problem with the insert-values function in clojure.contrib.sql. Basically, we passed in a single record for insert that in fact violated a foreign key constraint in the database (we were adding an accountid that was not in the accounts table). Usually when using clojure.con

Re: Error not bubbling up from clojure.contrib.sql insert-values function?

2009-06-05 Thread BrianS
within my company. Thanks again, Brian On Jun 5, 9:43 am, "Stephen C. Gilardi" wrote: > On Jun 5, 2009, at 9:16 AM, BrianS wrote: > > > > method found: println for class java.io.OutputStreamWriter > > (NO_SOURCE_FILE:0)> > > It sounds like you're

Re: Help with filechooser

2009-06-09 Thread BrianS
Emeka, Your 'file' is an actual file. What you want is it's name. I think the last line should look like this: (println (str "file " (.getName file) I worked on my Mac, I assume it will work in Windows. Brian On Jun 9, 11:53 am, Emeka wrote: > Sorry for the noise, I was too quick. > > On

ANT script/task for AOT compiling of clojure files?

2008-11-26 Thread BrianS
I am looking to see if anyone has come up with an ANT task or script for compiling clojure CLJ files using the clojure compiler. Much appreciated if anyone has anything to contribute. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the