private void UpdatePackageProductsSuppliers() {
		
		try {
			// creates DB connection
			Class.forName("oracle.jdbc.driver.OracleDriver");
			Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "ictoosd", "ictoosd");
			Statement stmt = conn.createStatement();
					
						
			// create date format of selected start date
			Calendar startDate = dcStartDate.getCalendar();
			String startDateStr = startDate.get(Calendar.YEAR) + "/" 
			                  + (startDate.get(Calendar.MONTH) + 1) + "/" 
					          + startDate.get(Calendar.DAY_OF_MONTH)
					          + " 00:00:00";
			
			// create date format of selected end date
			Calendar endtDate = dcEndDate.getCalendar();
			String endDateStr = endtDate.get(Calendar.YEAR) + "/" 
			                  + (endtDate.get(Calendar.MONTH) + 1) + "/" 
					          + endtDate.get(Calendar.DAY_OF_MONTH)
					          + " 00:00:00";
			
						
			// UPDATE SQL
			String sql = "update packages ";
			sql += "set ";
			sql += "pkgagencycommission = " + txtAgcyCms.getText().replace("$", "") + ",";
			sql += "pkgbaseprice = " + txtBasePrice.getText().replace("$", "") + ",";
			sql += "pkgdesc = " + "'" + taDescription.getText() + "',";
			sql += "pkgenddate = " + "TO_DATE('" + endDateStr + "', 'yyyy/mm/dd hh24:mi:ss')" + ",";
			sql += "pkgname = " + "'" + txtPkgName.getText() + "',";
			sql += "pkgstartdate = " + "TO_DATE('" + startDateStr + "', 'yyyy/mm/dd hh24:mi:ss')" ;
			sql += "where ";
			sql += "packageid = " + packageID;
			
			System.out.println(sql);
			// executes SQL
			int rowsUpdated = stmt.executeUpdate(sql);
			
			// no record updated
			if (rowsUpdated == 0)
			{
				//JOptionPane.showMessageDialog(null, "Zero row Updated.");
			// recored updated
			} else {
				//JOptionPane.showMessageDialog(null, rowsUpdated + " rows successfully Updated.");
			}
			
			//***Delete and Insert PackageProductsSuppliers	
						
			// *Delete SQL
			sql = "delete from packages_products_suppliers ";			
			sql += "where ";
			sql += "packageid = " + packageID;
			
			System.out.println(sql);
			
			// executes SQL
			int rowsDeleted = stmt.executeUpdate(sql);
			
			// no record Deleted 
			if (rowsDeleted == 0)
			{
				//JOptionPane.showMessageDialog(null, "Zero row Deleted.");
			// recored Deleted
			} else {
				//JOptionPane.showMessageDialog(null, rowsDeleted + " rows  Deleted.");
			}
			
			// **Insert
			// get selected list item index
			int[] selIdx = lstProSup.getSelectedIndices();		
			
			// loop through selected list items
			int rowsPpsInserted = 0;
			for ( int i = 0; i < selIdx.length; i++){			
			
					// Insert to Packages_Products_Suppliers
					// INSERT SQL
					sql = "insert into Packages_Products_Suppliers ";
					sql += "(";
					sql += "packageid,";
					sql += "productSupplierid";
					sql += ") values (";
					sql += packageID + ",";
					sql += lstVals[selIdx[i]]; // sets the productsupplierID of selected item
					sql += ")";
					
					System.out.println(sql);
					// executes SQL
					rowsPpsInserted += stmt.executeUpdate(sql);
			  }	
			  conn.close();	

		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}