Jdbc-odbc bridge with ms access don't understand greek characters?

孤人 提交于 2019-12-11 11:46:37

问题


I hava a java appl , i can make connection between my ms access database and my appl but when i write greek character in a textfield then my database appears disunderstandings characters. If there is no solution how i could change my database and my source code?


So how i could change my source code to change the database? Which database i must to use (java embedded , mysql ) i don't know. I just want to accepet the greek characters and to be ease to make the correction on my source code!

This is one of the parts in my source code that i use the database.....

String dbuser = "";
String dbpasswd = "";
String DriverPrefix = "jdbc:odbc:";
Sting DataSource = "mydatabase";
....
....
....
....
String User = usernameLoginTxtField.getText();
String Password = pwLoginField.getText();
String SQLString = "select * from Administrators where username = '"+User+"' and password = '"+Password+"'";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection(DriverPrefix+DataSource, dbuser, dbpasswd);
stmt = con.createStatement();
rset = stmt.executeQuery("select * from Administrators where username = '"+User+"' and password = '"+Password+"'";

Please Help me... i would like to explain me exactly how i must to make th correction in the source code, how to convert the ms access database etc.....

Thanks in Advance

来源:https://stackoverflow.com/questions/13998855/jdbc-odbc-bridge-with-ms-access-dont-understand-greek-characters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!