No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi, I am new to mysql connectivity using jsp. but i have tried it with MS Access nd it worked out for me. I have installed jdk1.4, Tomcat5.0, mysql 4.1 and mysql_connector_odbc_3.51.21_win32.msi. For the following code i am getting error code 500.. I have set the Env paths as path … | |
<html><body> <%@ page import="java.sql.*" %> <% String user="root@localhost"; // root itself String password="pwdl"; String connectionURL = "jdbc:mysql://localhost/Database_name"; Connection connection = null; Statement statement = null; ResultSet rs = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); connection = DriverManager.getConnection(connectionURL, user, password); statement = connection.createStatement(); rs = statement.executeQuery("SELECT * table"); while (rs.next()) { out.println(rs.getString("name")+"<br>"+rs. getString("emailid")+"<br>"+rs.getString("contents ")+"<br>"); } … |