TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
daniel burke
NA
2
0
Concurrency violation: the DeleteCommand
May 27 2016 7:12 AM
i am trying to update database after adding a row to a dataset but keep getting this error:
guage
Concurrency violation: the DeleteCommand affected 0 of the expected 1 records
i have not delete any rows just added one here is the code:
public void AddRow(System.Data.DataSet ds, string tablen, string[] info)
{
row = ds.Tables[tablen].NewRow();
row[0] = info[6];
row[1] = info[0];
row[2] = info[1];
row[3] = info[2];
row[4] = info[3];
row[5] = info[4];
row[6] = info[5];
ds.Tables[tablen].Rows.Add(row);
ds.Tables[tablen].DefaultView.Sort = "Date ASC";
objConnect.UpdateDatabase(ds, tablen);
}
public void UpdateDatabase(System.Data.DataSet ds, string tablen)
{
System.Data.SqlClient.SqlCommandBuilder cb = new System.Data.SqlClient.SqlCommandBuilder(da_1);
cb.DataAdapter.Update(ds, tablen);
}
please help
Reply
Answers (
1
)
Terminate Serial Recieved Data Handler
is it possible to convert whole xsd to xml ?