On 03/28/2017 07:32 AM, Beppe Mazzola wrote:
HiI want to use the JDBC driver in order to load data into my Virtuoso relational DB. As first thing I would like to see the driver working fine inserting in the DB non-Latin characters. So I have used this Java code import java.sql.Statement; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class BulkLoader { public static Connection getConnection() throws SQLException { try { Class.forName("virtuoso.jdbc4.Driver"); } catch (ClassNotFoundException e) { e.printStackTrace(); } Connection conn = DriverManager.getConnection("jdbc:virtuoso://127.0.0.1:1111/CHARSET=UTF-8/ <http://127.0.0.1:1111/CHARSET=UTF-8/>", "dba", "dba");
[Sergey]Connection string must be without /CHARSET=UTF-8 , because the option /CHARSET=UTF-8 must be used only, if you execute SPARQL queries and it must NOT be used for SQL
Connection conn = DriverManager.getConnection("jdbc:virtuoso://127.0.0.1:1111/ <http://127.0.0.1:1111/CHARSET=UTF-8/>", "dba", "dba"); -- Best Regards, Sergey Malinin
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Virtuoso-users mailing list Virtuoso-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/virtuoso-users