|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
<html><body>
<%@ page import="java.sql.*" %> <% String user=new String("root@localhost"); String password=new String("pwdl"); String connectionURL = new String("jdbc:mysql:// localhost/data_source_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 * feedback"); while (rs.next()) { out.println(rs.getString("myfield")+"<br>"); } rs.close(); %> </body></html> //feedback is table name; If i execute this code some internal error is comming so what may be the problem and whats the solution Plz tell me if u know |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Need Help Debugging Script/Error in Script - Jdbc connectivity to mysql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|