Jonas
Jonas

Reputation: 11

C# Access Database Remove Rows

Hey, I don't know how to remove a row in Access Database on C# I know how to add a row:

    Database3DataSet.ClientsDataTable Tclients = database3DataSet.Clients;
    Tclients.AddClientsRow(textBox1.Text, textBox2.Text);

But I don't know how to remove... Please help D:

Download link for the Application: http://uploading.com/files/11b69ce6/WindowsFormsApplication4.rar/ I Realy don't know why it's didn't work... Can you tell me what's the problem? Thanks. :)

Upvotes: 1

Views: 961

Answers (1)

Ken Pespisa
Ken Pespisa

Reputation: 22266

There's a Delete() method on the DataRow object.

Tclients.Rows[0].Delete();
Tclients.AcceptChanges();  // commit the changes

Upvotes: 1

Related Questions