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 foundSQLException 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
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 foundPath was not found The Apache Tomcat Native library which allows optimal performance in production environments was not
found on the java.library.path
identifier not foundidentifier not found Getting compilation error " identifier not
found " please explain ?
identifier means variable name,,,,make sure it same as declaration
File not found getting an error "emp_code.doc"(specified file not
found) Hi Friend
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 exceptionclass 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 foundHadoop 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
javax.servlet not found errorjavax.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 foundjavascript 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 linuxunrar 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-Servletno 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 foundpyspark 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 - JDBCclass 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 - Solvedejabberd_ctl.beam not
found - Solved Hi,
I installed ejabberd ejabberd-16.01-linux-x86_64-installer.run but it is giving following error:
root@deepak:/opt/ejabberd-16.01/bin# ./ejabberdctl available_modules
=ERROR REPORT
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 onincomplete 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 onincomplete 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 exceptionJava 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 withCommand '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 ubuntumake: 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
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
R command not found WindowsSolved: 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
PKG_PROG_PKG_CONFIG: command not foundPKG_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