anjuvijayan
HIIIII
1 Answer(s)      5 years and 8 months ago
Posted in : Java Beginners
import java.sql.*; 
import javax.swing.JOptionPane;
public class NewJFrame extends javax.swing.JFrame {
Connection con=null;
Statement st=null;
ResultSet rs=null;
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) 
{ 
{ 
try Class.forName("java.sql.Driver");
con=DriverManager.getConnection("jdbc:mysql://localhost/ACCOUNT","root","ADMIN");
st=con.createStatement(); String query="SELECT * FROM BANK"; rs=st.executeQuery(query); if(rs.next())

{
        String n=rs.getString("name");
        String b=rs.getString("address");
         String s=rs.getString("phone");
         String t=rs.getString("branch");

}
    else
    {
        JOptionPane.showMessageDialog(null,"no record");
    }

} } catch(Exception e) 

{
JOptionPane.showMessageDialog(null,"error"); 
} 

PLZ ANYONE HELP ME TO FIND ERROR IN DS PROGRAMME

Ads

View Answers

January 18, 2011 at 5:43 PM


Hi Friend,

Visit Here

Thanks










Related Tutorials/Questions & Answers:
Advertisements
java applets - Applet
java applets  hiiiii... i need ur help in usage of java code for navigation of one applet window to other...?? can you plz respond to me
String in Java - Java Beginners
String in Java  hiiiii i initialise a String array,str[] with a size. on beginning i dont know the actual requirement. on running i have to increase its size since it adds more elements to it. pls help me in it. thank
different type input in java
different type input in java  hiiiii... get input different different type like as DataInputStream,Scanner i want to get source code of these all type of input method. thank   Java Read through DataInputStream: import
Ajax+servlet+js
"); //String s=request.getParameter("name"); //String r="hiiiii"+s
abt java - Java Beginners
abt java   hiiiii i m new to this language i have some problem with my java code ... i working on netbeans .. i write a code for user authetication ... in this code it take user name password and a user certificate(which

Ads

Advertisement