File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Arduino in Action
this week in the
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
Joined: Aug 19, 2007
Aug 27, 2007 02:22:00
First of all thanking you to all of members to sending response to
my previous doubts.
I have some problem with the following code.
Though it is compiling and running, it gives false results.
First of all CODE is:
public class sample
rs=st.executeQuery("select * from uin where NUM='"+ UIN +"'");
System.out.println("Record is already exist");
ps=con.prepareStatement("insert into uin values(?)");
System.out.println("Number inserted Successfully:");
public static void main(String args)
sample s=new sample();
The above code is working.It always displays "Record is already exist".
If i doesn't have any records in my database it always dispalys the above code.
But i doesn't know wheter it is coding problem or driver problem.
programs are working properly in my system.
please clarify my doubt.
Joined: Nov 29, 2005
Aug 27, 2007 03:56:00
resultset would never be null , even if it doesn't have any record in it.
For more information related to this check javadoc.
I agree. Here's the link:
subject: JDBC Doubt
Database access, potential threading problem?
Runtime.exec() in Java not working in Oracle 10 Application Server
doubt in update
Doubt in JDBC
Doubt in the following code
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013