Solved

ado.net flag an existing row as a new row

Posted on 2011-09-15
1
290 Views
Last Modified: 2012-05-12
I wish to read in an order from last week, change the date and maybe a couple of other things then write it out as a new order.

I have tried setting the Id to -1 but that doesn't work - all that I get is Error Concurrency Violation.

It does work if I manually create a new datatable using NewRow which I can continue to do if necessary, but it would be a lot easier if I could simply fill the DataTable, change my values and apply the Update() method.
0
Comment
Question by:grwallace
1 Comment
 

Accepted Solution

by:
grwallace earned 0 total points
ID: 36542071
Use row.SetAdded() after filling the dataset and before changing any of the columns
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vb.net 2 43
DataGridView does not show data rows correctly in vb.net 2013 3 40
vb.net - How to check if current user is an administrator? 6 47
Expression Evaluater 3 27
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question