Hi,

> I have the server running on a different machine and I access it from
> my local machine. Is there no way to have CSVWRITE write to my current
> machine?

SQL statements are executed on the server, and the server doesn't have
access to the file system where the JDBC client runs (this is true for
all databases, not only H2). But you can use the Csv tool directly:

import org.h2.tools.*;
...
ResultSet rs = ...
Csv csv = Csv.getInstance();
csv.write("<path_to_local_file>", rs, "UTF-8");

Please note the default charset for Csv.write is not UTF-8 (the
javadocs are wrong), but the system default charset.

See also 
http://www.h2database.com/javadoc/org/h2/tools/Csv.html#write_String_ResultSet_String

Regards,
Thomas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to