title: cant update data in sqlite database
body: <pre><code>TextView desc,details,responsibility,status,txtdate;
  EditText equipment_id;
  DBController controller = new DBController(this,null,null,1);
  ImageButton btnupdate;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.search_update_equiments);
  
      equipment_id = (EditText)findViewById(R.id.txtequipmentid);
      desc = (TextView)findViewById(R.id.txtdescription);
      details = (TextView)findViewById(R.id.txtdetails);
      status = (TextView)findViewById(R.id.txtstatus);
      txtdate = (TextView)findViewById(R.id.txtdate);
      responsibility = (TextView)findViewById(R.id.txtresponsibilitycenter);
      btnupdate = (ImageButton)findViewById(R.id.btnupdate);
  
      //desc.setVisibility(View.GONE);
      //details.setVisibility(View.GONE);
     // responsibility.setVisibility(View.GONE);
     // btnupdate.setVisibility(View.GONE);
  
  
      Calendar c = Calendar.getInstance();
      SimpleDateFormat df = new SimpleDateFormat("dd-MMM-yyyy");
      String formattedDate = df.format(c.getTime());
      txtdate.setText(formattedDate);
  
          //update data
      btnupdate.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              try {
                  //String status = "1";
                  controller = new DBController(getApplicationContext(), null, null ,1);
                  SQLiteDatabase database = controller.getWritableDatabase();
                  ContentValues data = new ContentValues();
  
                  data.put("description", desc.getText().toString());
                  data.put("details", details.getText().toString());
                  data.put("responsibility_center",responsibility.getText().toString());
                  data.put("status", status.getText().toString());
                  data.put("date_taken", txtdate.getText().toString());
  
                  database.update("tbl_equipments", data, "equipment_id=" + equipment_id.getText().toString(), null);
                  //database.update("tbl_equipments", data, "equipment_id=" + equipment_id.getText().toString(), null);
                  Toast.makeText(Search_Equipments.this, "Updated successfully", Toast.LENGTH_SHORT).show();
  
              } catch (Exception ex) {
                  Toast.makeText(Search_Equipments.this,ex.getMessage(), Toast.LENGTH_SHORT).show();
              }
          }
      });
  }
  
  //search equipment
  public void searchEquipment(View view){
      if (equipment_id.getText().toString().equals("")){
          Toast.makeText(Search_Equipments.this,"Please Enter Equipement No.",Toast.LENGTH_LONG).show();
      } else  {
          controller = new DBController(this, null, null , 1);
          Equipment equipment = controller.getEquipment(equipment_id.getText().toString());
          if (equipment != null){
  
              desc.setText(String.valueOf(equipment.get_description()));
              details.setText(String.valueOf(equipment.get_details()));
              responsibility.setText(String.valueOf(equipment.get_responsibility()));
  
              desc.setVisibility(View.VISIBLE);
              details.setVisibility(View.VISIBLE);
              responsibility.setVisibility(View.VISIBLE);
              btnupdate.setVisibility(View.VISIBLE);
          }else {
            Toast.makeText(Search_Equipments.this,"Not Found",Toast.LENGTH_LONG).show();
          }
      }
  
  }
  </code></pre>
  
  <p>can someone help my code. if passed the condition that data successfully updated but when i display the updated data from database data has not updated, can someone help me to fix this. . . . . . because i dont where is my error there. see my update code. thanks :)</p>