hi i am alka
my problem is i cant run the program
import java.sql.*;
import java.awt.*;
import java.awt.event.*;
public class
jdbc extends Frame implements ActionListener
{
TextField t1;
TextField t2;
Button b;
Button b1;
Button b2;
Button b3;
Button b4;
Button b5;
Button b6;
Panel P;
ResultSet rs;
Connection con;
Statement st;
public jdbc()
{
super("your data here");
setLayout(new GridLayout(5,1));
t1=new TextField(20);
t2=new TextField(20);
b=new Button("next");
b1=new Button("previous");
b2=new Button("exit");
b3=new Button("close");
b4=new Button("clear");
b5=new Button("modify");
b6=new Button("search");
P=new Panel();
add(new Label("name"));
add(t1);
add(new Label("class"));
add(t2);
add(P);
P.add(b);
P.add(b1);
P.add(b2);
P.add(b3);
P.add(b4);
P.add(b5);
P.add(b6);
b.addActionListener(this);
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
b4.addActionListener(this);
b5.addActionListener(this);
b6.addActionListener(this);
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc

dbc:aa");
st=con.createStatement();
rs=st.executeQuery("select*from table1");
}
catch(Exception e)
{}
}
public static void main(
String args[])
{
jdbc j=new jdbc();
j.setSize(300,300);
j.setVisible(true);
}
public void actionPerformed(ActionEvent ae)
{
if(ae.getSource()==b)
{
try
{
rs.next();
t1.setText(rs.getString(1));
t2.setText(rs.getString(2));
}
catch(Exception e)
{}
}
if(ae.getSource()==b5)
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc

dbc:aa");
PreparedStatement ps=con.prepareStatement("insert into table1(name,class) values(?,?)");
t1.setText(rs.getString(1));
t2.setText(rs.getString(2));
ps.executeUpdate();
}
catch(Exception e)
{}
}
}
}
could any body tell me the solution