<%String connectionURL = "jdbc:mysql://localhost:3306/database_name"; Connection connection = null; Statement statement = null;Class.forName("com.mysql.jdbc.Driver").newInstance(); connection = DriverManager.getConnection(connectionURL, "database_username", "database_password"); statement = connection.createStatement(); %>
jsp connectivityClass.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.
Copyright ©2003-2009 CoolInterview.com, All Rights Reserved. Privacy Policy | Terms and Conditions Page URL: http://www.coolinterview.com/interview/12633/default.asp?cachecommand=bypass