L
Lew
Arne said:Can you backtranslate analogu->real world ?
Sure: it wasn't a very good analogy. It's actually not like trying to catch
a black cat in a dark room blindfolded.
Arne said:Can you backtranslate analogu->real world ?
Virtualise the tuna.Obviously, one would stuff the SQL Server machine with tuna.
However, in this case, the server is on a virtual machine. Not sure how
to proceed here.
[ SNIP ]Tom said:Tom said:Has anyone made SQL Server work with unicode in java?
I can't get it not to work.
The following is tested with the MS driver (driver for 2000
against 2000, but I expect 2005 against 2005 to work identical):
public class Unicode {
public static void main(String[] args) throws Exception {
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
// SQLServer 2000
Connection con =
DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost;DatabaseName=Test",
"sa", "");
Statement stmt = con.createStatement();
stmt.executeUpdate("CREATE TABLE unifun (id INTEGER NOT NULL,
data NVARCHAR(50), PRIMARY KEY(id))");
stmt.executeUpdate("INSERT INTO unifun VALUES(1,N'?????? the
wrong way')");
PreparedStatement pstmt = con.prepareStatement("INSERT INTO
unifun VALUES(?,?)");
pstmt.setInt(1, 2);
pstmt.setString(2, "?????? the correct way");
pstmt.executeUpdate();
ResultSet rs = stmt.executeQuery("SELECT id,data FROM unifun");
while(rs.next()) {
System.out.println(rs.getInt(1) + " : " + rs.getString(2));
}
rs.close();
stmt.executeUpdate("DROP TABLE unifun");
stmt.close();
con.close();
}
}
Silly question, but those ?s were unicode characters before you pasted
this into usenet, right?
Tom said:[ SNIP ]Silly question, but those ?s were unicode characters before you pasted
this into usenet, right?
Arved said:FWIW, Tom, I saw his original characters OK when I read his post...just
a bunch of unlauts [sic] that he'd need when he reads and writes in his
heathen language... ....
* I'm one to talk - if I read and write in my mother tongue I need äöüõ.
Arved said:* I'm one to talk - if I read and write in my mother tongue I need äöüõ.
Estonian. My name however is 100% Swedish, and I'm about 1% Swedish.Lars said:Which tongue is that? Not Swedish, it seems. Your name looks vaguely
Swedish, though.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.