Post Reply 
 
Thread Rating:
  • 1 Votes - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Specify a CharSet when connecting to a DBMS
12-21-2010, 07:31 AM
Post: #1
Specify a CharSet when connecting to a DBMS
Class.forName(sun.jdbc.odbc.JdbcOdbcDriver) ;

// setup the properties
java.util.Properties prop = new java.util.Properties();
prop.put("charSet", "iso-8859-7"); // for example...
prop.put("user", username);
prop.put("password", password);

// Connect to the database
con = DriverManager.getConnection(url, prop);
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:



Send your comments, Suggestions or Queries regarding this site at info@tutorials4u.net

Copyright © 2010 Tutorials4u.net All Rights Reserved