How to perform Insert Operation by Button Click in android
<p>friends, I am having trouble during insertion.The <code>insert1.setOnClickListener(new View.OnClickListener()</code> shows Error.Anyone having solution suggest me</p>

<pre><code>@Override

protected void onCreate(Bundle savedInstanceState) {

// TODO Auto-generated method stub

super.onCreate(savedInstanceState);

setContentView(R.layout.insert);

ename=(EditText)findViewById(R.id.editText1);

eid=(EditText)findViewById(R.id.editText2);

insert1.setOnClickListener(new View.OnClickListener() {


        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
        empname=ename.getText().toString();
        empid=Integer.parseInt(eid.getText().toString());
        Intent insert=new Intent(Insert.this,DBAdapter.class);
        Bundle bundle=new Bundle();
        bundle.putString("EMPNAME", empname);
        bundle.putInt("EMPID", empid);
        insert.putExtras(bundle);
        startActivityForResult(insert,1);
        //DBAdapter db = null;
        //db.insert(empname,empid);
        }
    });
}
</code></pre>
