Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Optional Feature Not Implemented

843841Apr 3 2007 — edited Apr 4 2007
hello,

I get this Error "OptionalFeature Not Implemented", whenever I execute the following code.Attached below is a snippet.

Can someone please help me rectify the error.
	   String Flt_id = req.getParameter("FlightIdFld");
	   String strdate = req.getParameter("DateFld");
	   String TotalSeats = req.getParameter("TotalSeatsFld");
   	   String ExecSeats = req.getParameter("ExecutiveFld");
       String EcoSeats = req.getParameter("EconomyFld");


       SimpleDateFormat sdf;
	   java.util.Date util_date1 = null;
	   java.sql.Date  sql_date1 = null;
	    java.sql.Date  date = null ;		


	   try
	   {
      	   sdf = new SimpleDateFormat("dd-MM-yyyy"); 	   
		   util_date1 = sdf.parse(strdate);
		   sql_date1 = new java.sql.Date(util_date1.getTime());
		   date = sql_date1; 
	   }

	   catch ( Exception e )
	   {
	   pw.println("Error");
	   }

	   try
		  {

			  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
			  Connection con =DriverManager.getConnection("jdbc:odbc:TDU","","");
              Statement stmt = con.createStatement();
			  ResultSet rs;

			  PreparedStatement ps = con.prepareStatement("Insert INTO Flight_Availability(Flt_Id,Flight_Date,Total_Seats,Executive,Economy) VALUES (?,?,?,?,?)");
											                                                          
			  ps.setString(1,Flt_id); 
			  ps.setDate(2,date);
			  ps.setString(3,TotalSeats);
			  ps.setString(4,ExecSeats);
			  ps.setString(5,EcoSeats);	
			  
			  int check=ps.executeUpdate();
		
					  if (check>0)
						 {
							 pw.println("Value has been entered into the database.");
						 }
					  else
						 {
						 pw.println("Error!");
						 }

						 		
								
				  ps.close();
				  con.close();

		  } // Try ends 

            catch(SQLException se)
				 {
				 pw.println("Database Error : "  +se);
				 }		
Thanks a lot for all the help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 2 2007
Added on Apr 3 2007
4 comments
313 views