Results 1 to 1 of 1
-
Specifying the character set while connecting to the database
Code snippet below shows how to specify the character set when connection to the database.
Java Code: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);
Similar Threads
-
connecting to a database
By mxb7642 in forum JDBCReplies: 5Last Post: 09-08-2009, 08:39 AM -
Connecting to a database
By peiceonly in forum New To JavaReplies: 2Last Post: 04-06-2008, 02:28 PM -
problem in connecting to mysql database
By nancyv in forum Java ServletReplies: 6Last Post: 04-02-2008, 11:33 AM -
Error while connecting to a database
By Fukushuusha in forum JDBCReplies: 2Last Post: 12-16-2007, 09:40 AM -
connecting to mysql database
By javagal in forum NetBeansReplies: 2Last Post: 08-04-2007, 12:36 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks