JDBC Connection with DB2
i am a CSE student. i have completed core java, i am not able to graps a vast knowledge on JDBC connection.
so kindly give some notes, tips & tricks on JDBC which help me to developing some large project.
thank you.
Member • Oct 28, 2007
Following might helpswastiHi
i am a CSE student. i have completed core java, i am not able to graps a vast knowledge on JDBC connection.
so kindly give some notes, tips & tricks on JDBC which help me to developing some large project.
thank you.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); return DriverManager.getConnection("jdbc:odbc:" + databaseName, userId, password);
Member • Oct 30, 2007
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:DSNname"); Statement st = con.createStatement(); e.g.->String sql="Select * from databasename"; St.executeUpdate(sql);
Member • Nov 5, 2007
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc.odbc.DSN"); If your has a username and password, then provide the following: DriverManager.getConnection("jdbc:odbc:DSN","user","password");Add the path of IBM>db2>SQLLIB>BIN to the "path" environment variable(if u r working with Windows).
Member • Dec 3, 2007