Howdy, 1) Please include OFF-TOPIC in the subject line if you post off-topic message to a list. 2) Better yet, don't post off-topic messages to a list. A message like this belongs in comp.lang.java.help or similar groups. 3) You need a return statement in your catch clause as well to avoid the missing return statement compilation error.
Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, July 09, 2002 8:46 AM >To: [EMAIL PROTECTED] >Cc: [EMAIL PROTECTED] >Subject: missing return statement error?!??! > >Hi, >This is not a tomcat's question. I've made a class with a find method. >When I compile it with ANT, I 've a missing return statement error whereas >i've specified return type. >Here is the code : > > >public String [] find(String mail) { > String system= "qs44a6005"; > String collectionName="JC"; > String Table="T_Client"; > String[] Tab=null; > > // Obtenir les param�tres de la requ�te. > Connection connection=null; > > > try{ > // Chargement du driver JDBC pour AS/400. > > DriverManager.registerDriver( > new com.ibm.as400.access.AS400JDBCDriver()); > > // Obtient une connection � la database. > connection = DriverManager.getConnection ("jdbc:as400://" + >system+ "/" + collectionName,"PCS","PCS"); > Statement lireTable = connection.createStatement (); > ResultSet rs1= lireTable.executeQuery("SELECT >NOM,CODE,TEL,PORT,PASS FROM "+collectionName+"."+Table+" WHERE MAIL='" >+mail+"'"); > if(rs1.next()){ > // on r�cup�re les membres du resultSet > Tab[0]=rs1.getString("NOM"); > Tab[1]=rs1.getString("CODE"); > Tab[2]=rs1.getString("TEL"); > Tab[3]=rs1.getString("PORT"); > Tab[4]=rs1.getString("PSWD"); > > } > > System.out.println("fin test existe"); > lireTable.close(); > connection.close (); > return Tab; > > } > catch(Exception e){ > System.out.println (); > System.out.println ("ERROR: " + e.getMessage()); > } > > >} > > >Thanks. > >garsJC > > >-- >To unsubscribe, e-mail: <mailto:tomcat-user- >[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:tomcat-user- >[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
