SQLException caught: No data found

SQLException caught: No data found

i m using ms office 2010, n when i run my source code it is giving error SQLException caught:No data found, plz help me why i am getting this exception, thanks alot, my source code is as :

import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.awt.print.*; import sun.audio.*; import java.io.*; import java.sql.*; class loginevati extends JFrame implements ActionListener { JLabel l,l1,l2; JTextField t,t1; JPasswordField p; JButton b,b1; JPanel p1,p2,p3,p4,p5,p6,p7; Container c; Color c1=new Color(128,128,128); private Image img;

loginevati()
{
  c=getContentPane();
  //setLayout(new FlowLayout(FlowLayout.CENTER));

  l=new JLabel("              EVATI");
  l.setFont(new Font("TimesNewRoman",Font.BOLD,30));
  l.setForeground(Color.black);

  ImageIcon i=new ImageIcon("natureevati.jpg");
  img=i.getImage();
  //JLabel li=new JLabel(i);

  t=new JTextField("  English Voice And Accent Training Institute");
  t.setFont(new Font("TimesnewRoman",Font.BOLD,15));
  t.setForeground(Color.white);
  t.setBackground(Color.green);
  t.setEditable(false);
  t.setPreferredSize(new Dimension(330,10));

  l1=new JLabel("User Name");
  l2=new JLabel("Password  ");

  l1.setForeground(Color.blue);
  l2.setForeground(Color.blue);

  b=new JButton("Login");
  b.setForeground(Color.blue);

  b1=new JButton("Change Password");
  b1.setForeground(Color.blue);

  t1=new JTextField(10);
  p=new JPasswordField(10);
  t1.setForeground(c1);
  p.setForeground(c1);

  p1=new JPanel();
  p1.add(l);
  p1.add(t);
  p1.setLayout(new GridLayout(2,1));
  p1.setBackground(c1);

  p7=new JPanel();
  p7.add(p1);
  p7.setLayout(new FlowLayout(FlowLayout.CENTER));

  p2=new JPanel();
  p2.add(l1);
  p2.add(t1);
  p2.setLayout(new FlowLayout(FlowLayout.CENTER));

  p3=new JPanel();
  p3.add(l2);
  p3.add(p);
  p3.setLayout(new FlowLayout(FlowLayout.CENTER));



  p4=new JPanel();
  p4.add(b);
  p4.add(b1);
  p4.setLayout(new FlowLayout(FlowLayout.CENTER));

  p5=new JPanel();
  p5.add(p2);
  p5.add(p3);
  p5.add(p4);
  p5.setLayout(new GridLayout(3,1));

  p6=new JPanel();
  p6.add(p7);
  p6.add(p5);
  p6.setLayout(new GridLayout(2,1));



  c.add(p6);
  c.setLayout(new FlowLayout(FlowLayout.CENTER));
  //c.setBackground(img);

  b.addActionListener(this);


}

public void actionPerformed(ActionEvent e)
{
  if(e.getSource()==b)
  {
     String s=t1.getText();
     String ss=p.getText();
     System.out.println(s);
     System.out.println(ss);
     try
     {
       Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
       Connection con=DriverManager.getConnection("jdbc:odbc:evati1");
       Statement st=con.createStatement(); System.out.println("u got is  ajay the great");
       ResultSet rs=st.executeQuery("select * from login where username='"+s+"' and password='"+ss+"'");

       String uname="",pass="";
       while(rs.next())
       {
         uname=rs.getString("username");
         pass=rs.getString("password");
       }
        if(s.equals(uname) && ss.equals(pass))
        {

        }

     }
      catch(ClassNotFoundException ee)
{
  System.out.println("eer");
}
 catch(SQLException eee)
{
  System.out.println("SQLException caught:"+ eee.getMessage());

}
  }
}
public static void main(String args[])
{
  JFrame k=new loginevati();
  k.setTitle("LOGIN");
  k.setSize(500,500);
  k.setVisible(true);
  k.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
}

}

View Answers









Related Tutorials/Questions & Answers:
SQLException caught: No data found
SQLException caught: No data found  i m using ms office 2010, n when i run my source code it is giving error SQLException caught:No data found, plz...) { System.out.println("eer"); } catch(SQLException eee) { System.out.println
SQLException:Column not found? (help me:(
SQLException:Column not found? (help me:(  import javax.swing.... extends JFrame implements ActionListener { String userid="data",password="1234...() { super("Store Data"); setSize(300,400
Advertisements
ODBC driver manager return 'Data source name not found.
ODBC driver manager return 'Data source name not found.  Why does the ODBC driver manager return 'Data source name not found and no default driver specified Vendor: 0
error getting repository data for epel repository not found centos 7
error getting repository data for epel repository not found centos 7  Hi, Can't find repository while installing one of the software using yum because of the error: error getting repository data for epel repository not found
error getting repository data for epel repository not found centos 7
error getting repository data for epel repository not found centos 7  Hi, Can't find repository while installing one of the software using yum because of the error: error getting repository data for epel repository not found
JDBC Class Not Found Exception
not found exception. SQLException The SQLException is raised when there is any...; } JDBC ClassNotFoundException And SQLException ClassNotFoundException...());     } ADS_TO_REPLACE_1 If the database driver class not found
Path was not found
Path was not found  The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path
sqlexception - SQL
sqlexception - Hibernate
identifier not found
identifier not found  Getting compilation error " identifier not found " please explain ?   identifier means variable name,,,,make sure it same as declaration
File not found
not found
File not found
not found
File not found
"(specified file not found
File not found
"(specified file not found
File not found
getting an error "emp_code.doc"(specified file not found)  Hi Friend
File not found
not found)  Hi Friend, Visit Here Thanks
Steps not found.
Steps not found.  import java.io.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; public class Details1 extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse
mycustomer.hbm.xml not found
(); //Query q=s.createQuery("from mycustomer"); //q.setCacheable(true); //l... name="p1.mycustomer" table="fedback_data"> <composite-id name="name" type...; </property> <property name="quality"> <column name="Q"/>
mycustomer.hbm.xml not found
(); org.hibernate.Session s=sf.openSession(); Transaction t=s.beginTransaction(); //Query q...="p1.mycustomer" table="fedback_data"> <composite-id name="name" type...;/property> <property name="quality"> <column name="Q"/> <
Resource 'corpora/wordnet' not found.
Resource 'corpora/wordnet' not found.  Hi, I am working on NLTK project for Big Data and while running a program it throws error: Resource 'corpora/wordnet' not found. Complete error log: Resource 'corpora/wordnet' not found
Resource 'corpora/wordnet' not found.
Resource 'corpora/wordnet' not found.  Hi, I am working on NLTK project for Big Data and while running a program it throws error: Resource 'corpora/wordnet' not found. Complete error log: Resource 'corpora/wordnet' not found
class not found exception
class not found exception  org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterprint("code sample
ModuleNotFoundError: No module named 'found'
ModuleNotFoundError: No module named 'found'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'found' How to remove the ModuleNotFoundError: No module named 'found'
Hadoop command not found
Hadoop command not found  Hi, I am trying to put file with the command: hadoop fs -put test.txt /test/ But its saying hadoop command not found.... Check more tutorial at Big Data tutorials, technologies, questions and answers
Resource 'tokenizers/punkt/english.pickle' not found.
Resource 'tokenizers/punkt/english.pickle' not found.  Hi, I am.../punkt/english.pickle' not found. Please use the NLTK Downloader to obtain.../nltk_data' - 'C:\\nltk_data' - 'D:\\nltk_data' - 'E:\\nltk_data
Resource 'tokenizers/punkt/english.pickle' not found.
Resource 'tokenizers/punkt/english.pickle' not found.  Hi, I am.../punkt/english.pickle' not found. Please use the NLTK Downloader to obtain.../nltk_data' - 'C:\\nltk_data' - 'D:\\nltk_data' - 'E:\\nltk_data
javax.servlet not found error
javax.servlet not found error  why iam getting javax.servlet error while running my servlet program...after setting the classpath also i am finding that problem
javascript image not found
javascript image not found  javascript if image not found   <a href='$image'> <img alt='No Image' src='$image' onError="this.parentNode.onclick=function() {return(false);}"> </a>
unrar command not found in linux
unrar command not found in linux  Hi, I am trying to unrar a file in Linux with following command: unrar myfile.rar Here is complete log...' not found, but can be installed with: sudo apt install unrar-free sudo apt install
no def found - JSP-Servlet
no def found  i have used the code of file upload from rose india but when i run no def found for fileupload exception although i have put jar file in lib folder code i get from D:\project\Uploading Employee Profile
CLASS NOT FOUND EXCEPTION
CLASS NOT FOUND EXCEPTION   I AM USING INTERNET EXPLORER VERSION 6.00... NOT FOUND EXCEPTION AND THE BOX IS DISPLAYED AND I CLICK ON DETAILS BUTTON...: trigger logging q: hide console r: reload policy configuration s
pyspark lit function not found
pyspark lit function not found  Hi, I want to use the lit function in PySpark Program. But unable to find it to use in program. How to use pyspark lit function and remove the pyspark lit function not found error
class not found error - JDBC
class not found error  thanks for your response. please clarify the following doubts. i am having the specified mysql connector jar file. where that jar file has to be placed. also does the jdbc driver need to be installed
ejabberd_ctl.beam not found - Solved
ejabberd_ctl.beam not found - Solved  Hi, I installed ejabberd ejabberd-16.01-linux-x86_64-installer.run but it is giving following error: [email protected]:/opt/ejabberd-16.01/bin# ./ejabberdctl available_modules =ERROR REPORT
Error:No Class Found Exception:org.postgresql.driver
Error:No Class Found Exception:org.postgresql.driver  Error:No Class Found Exception:org.postgresql.driver while connecting JDBC With PostgreSQL 8.4 I m running My Program with java 6.0
unable to import class com.opensymphony.xwork2.ActionContext not found
unable to import class com.opensymphony.xwork2.ActionContext not found  Imported class com.opensymphony.xwork2.ActionContext not found gettin the above error
http 404 resource not found error
http 404 resource not found error   Sir, I have downloaded your RichLRApplication and deployed on tomcat 6 with oracle backend. Application started... not found error. Kindly advise. ss
incomplete final line found by readTableHeader on
incomplete final line found by readTableHeader on  Hi, I am reading...", fileEncoding="UTF-16", dec="\t") invalid input found on input connection 'Expdesign.txt'incomplete final line found by readTableHeader on 'myfile.txt'> How
incomplete final line found by readTableHeader on
incomplete final line found by readTableHeader on  Hi, I am reading...", fileEncoding="UTF-16", dec="\t") invalid input found on input connection 'Expdesign.txt'incomplete final line found by readTableHeader on 'myfile.txt'> How
Java file not found exception
Java file not found exception This section illustrates you the concept of file not found exception. Java provides a powerful concept of Exceptions... by a code. When a file with the specified pathname does not exist, file not found
Command 'gem' not found, but can be installed with
Command 'gem' not found, but can be installed with  Hi, I am trying to install once software with gem but its giving following error on Ubuntu: Command 'gem' not found, but can be installed with: sudo snap install ruby
make: gcc: Command not found ubuntu
make: gcc: Command not found ubuntu  Hi, I am getting following error while installing a program in Ubuntu. Building native extensions. This could take a while... ERROR: Error installing zombie_writer: ERROR: Failed
exception handling code for file not found error..
exception handling code for file not found error..  How to do exception handling for file not found error
MySQL server PID file could not be found! [FAILED]
MySQL server PID file could not be found! [FAILED]  MySQL server PID file could not be found! [FAILED
ubuntu disco Release 404 Not Found
://in.archive.ubuntu.com/ubuntu disco Release 404 Not Found [IP: 43.255.166.254 80] Err:5 http://in.archive.ubuntu.com/ubuntu disco-updates Release 404 Not Found [IP... Release 404 Not Found [IP: 43.255.166.254 80] Ign:7 http://security.ubuntu.com
ModuleNotFoundError: No module named 'Better-Than-You-Found-It'
ModuleNotFoundError: No module named 'Better-Than-You-Found-It'  Hi...: No module named 'Better-Than-You-Found-It' How to remove the ModuleNotFoundError: No module named 'Better-Than-You-Found-It' error? Thanks  
ModuleNotFoundError: No module named 'Better-Than-You-Found-It'
ModuleNotFoundError: No module named 'Better-Than-You-Found-It'  Hi...: No module named 'Better-Than-You-Found-It' How to remove the ModuleNotFoundError: No module named 'Better-Than-You-Found-It' error? Thanks  
R command not found Windows
Solved: R command not found Windows After installing R Programming tool... the issue R command not found Windows in command prompt then due to some reason r... command not found Windows" error. R Programming Online Training Join our
data
data  Handling data
PKG_PROG_PKG_CONFIG: command not found
PKG_PROG_PKG_CONFIG: command not found  Hi, How to solve PKGPROGPKG_CONFIG: command not found error This error is coming while executing the configure script. Thanks

Ads