[C#] Delete listbox item that using DataSource from mdb(MS ACCESS)

02/18/2013 15:24 PraDevil[ELITE]#1
i create a winform program and have a listbox and delete button in my form. my listbox is using a datasource/databinding that come from .mdb(Microsoft Access) file. here are the delete button code i use now
Code:
private void deletepcsetting_Click(object sender, EventArgs e)
{
    DialogResult dialogResult = MessageBox.Show("Are you sure want to delete PC No " + listBox1.SelectedItem + "?", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
    if (dialogResult == DialogResult.Yes)
    {
        PCNo selectedPCNo = (PCNo)listBox1.SelectedItem;
        if (selectedPCNo != null)
        {
            OleDbCommand cmd = new OleDbCommand("DELETE FROM ClientListing WHERE PCNO = " + listBox1.SelectedItem + "", GetConnection());
            _pcno.Remove(selectedPCNo);
        }
        GetConnection().Close();
    }
}
ignore about the message box, the code above successful delete the item from my listbox but not from the database(mdb), so this thing give me a problem because after reopen the form i notice the item that has been deleted before is still there(its just delete from listbox but not mdb)

i also has tried to change delete command from " + listBox1.SelectedItem + " to "selectedPCNo" but i don't get luck..does anyone know how to achieve this? sorry for my bad english anyway..
02/20/2013 13:35 SwarN#2
where do you open the database connection?

Give more informations about your code, or people can't help you.