1. AC Question's Avatar
    name = (EditText) findViewById(R.id.editText_name);
    mob = (EditText) findViewById(R.id.editText2_mob);
    pmob = (EditText) findViewById(R.id.editText3_pmob);
    course = (EditText) findViewById(R.id.editText4_course);

    result= (TextView) findViewById(R.id.result);
    dbHandler = new DBHandler(this, null, null, 1);
    printDatabase();
    }

    //Add a product to the database
    public void addButtonClicked(View view){

    //showing error msg int his line below
    Students student= new Students(name.getText().toString(),mob.getText(),pmob.getText(),course.getText().toString());
    dbHandler.addToDB(student);
    printDatabase();
    }
    10-12-2016 11:58 PM

Similar Threads

  1. How to sync phone and tablet
    By RealtorROb in forum Ask a Question
    Replies: 1
    Last Post: 10-14-2016, 11:38 AM
  2. Replies: 2
    Last Post: 10-13-2016, 04:59 AM
  3. Why do i have a second screen to bypass after the lock screen
    By AC Question in forum Ask a Question
    Replies: 2
    Last Post: 10-13-2016, 04:56 AM
  4. Replies: 0
    Last Post: 10-12-2016, 10:19 PM
  5. Replies: 0
    Last Post: 10-12-2016, 10:14 PM
LINK TO POST COPIED TO CLIPBOARD