How do I delete a record in the table using ADO.Net dataset?
To delete a record, you first get the DataRow object from the DataTable object. Then you simply call the Delete() method of the data row object to delete a record from the data table.C# Version
DataTable dt = ds.Tables["Article"]; // Delete DataRow dr = dt.Rows[3]; dr.Delete(); da.Update(ds, "Article"); ds.AcceptChanges();
VB.Net Version
Dim dt As DataTable
dt = ds.Tables("Article")
' Delete
Dim dr As DataRow
dr = dt.Rows(3)
dr.Delete()
da.Update(ds, "Article")
ds.AcceptChanges()
Back
Sponsored links
.Net Application Updating
One easy to use component adds safe and reliable updating features. Download today for a free trial.
One easy to use component adds safe and reliable updating features. Download today for a free trial.
BugSplat - Automatic Crash Analysis
Fast online exception analysis. Capture customer crash data online.
Fast online exception analysis. Capture customer crash data online.
.Net Localization Tool Sisulizer
Localize your .Net apps: ResX and assemblies. Database, XML & HTML Help localization. Try Sisulizer!
Localize your .Net apps: ResX and assemblies. Database, XML & HTML Help localization. Try Sisulizer!
CSTSOFT Instrumentation .NET & ActiveX Components
A collection of 13 instrumentation .NET/ActiveX/VCL components including Gauge,Knob,LED,Trend etc.
A collection of 13 instrumentation .NET/ActiveX/VCL components including Gauge,Knob,LED,Trend etc.
Web based bug tracking - AdminiTrack.com
AdminiTrack offers an effective web-based bug tracking system designed for professional software development teams.
AdminiTrack offers an effective web-based bug tracking system designed for professional software development teams.
