Hi everyone,
I have inherited a J2EE application running inside a JBoss environment and am having trouble getting it to save Polish data correctly to the database.
I have the following code snipped which I have run in its own command line application I created and also run inside the JBoss application in question.
Class.forName("net.sourceforge.jtds.jdbc.Driver"); conn = DriverManager.getConnection("jdbc:jtds:sqlserver://localhost:1433/MyDatabase;selectMethod=cursor;appName=MyApp;", "MyUser", "password"); PreparedStatement t = conn.prepareStatement("insert into Test (TestColumn) values (N'Zwo?ywano - Outside of session')"); t.execute(); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { try { conn.close(); } catch (Exception ex) {} }