Hai to all,
I got an error while compiling this code.
public boolean update1(
String Uin)
{
try
{
ResultSet rs=null;
Statement st=null;
Connection con=null;
PreparedStatement ps=null;
String UIN=Uin;
String name="";
boolean flag1=false;
Class.forName("oracle.jdbc.driver.OracleDriver");
System.out.println("DriverLoaded");
con=DriverManager.getConnection("jdbc

racle:thin:@localhost:1521

racle","scott","tiger");
System.out.println("Connection established");
st=con.createStatement();
rs=st.executeQuery("select *from uin");
while(rs.next())
{
name=rs.getString(1);
if(name.equalsIgnoreCase(UIN))
flag1=true;
}
if(!flag1)
{
ps=con.prepareStatement("insert into uin values(?)");
ps.setString(1,name);
int i=ps.executeUpdate();
if(i>0)
System.out.println("Number is Successfully Inserted");
flag1= true;
}
return flag1;
}//try
catch(Exception e)
{
e.printStackTrace();
}
}//method
the error message is :
--------------------------
BeanLogic.java:87: missing return statement
{
^
1 error
please help me to solve this problem...