Dear Monet team,

I've been getting quite a bit of use out of your example code here:

http://dev.monetdb.org/hg/MonetDB/file/tip/java/example/SQLcopyinto.java

Recently, though, I ran into a problem.  If the "COPY INTO" statement that I issue is wrong, for example the referenced table doesn't exist, Monet comes back with an error.  The example isn't checking for this error condition and proceeds to send data anyway.  With a really large batch of data, this becomes a problem because the SQL parser ends up trying to parse all that data as if it were SQL and basically chokes on it.

The solution is to add something like the following after the out.newLine() on line 86:

error = in.waitForPrompt();
if (error != null) {
    throw new Exception(error);
}

Cheers,

--

Percy Wegmann
+1 512 637 8500 ext 148