473,379 Members | 1,245 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

inserting row in dataset PB

fh
Hello,
I use a typed dataset in one table I have

this.columnID.AutoIncrement = true;

I thought that would let the dataset dealing with the generation of
primary key.

but when I insert a new datarow that way:
DataRow drDowntimeSup = _dsDowntime.Tables["PPE_DOWNTIME"].NewRow();
drDowntimeSup.BeginEdit();
drDowntimeSup.ItemArray= drCurentLine.ItemArray;
//drCurentLine is an existing line
.......... I change some columns, not the "ID" column.

drDowntimeSup.EndEdit();
_dsDowntime.Tables["PPE_DOWNTIME"].Rows.Add(drDowntimeSup);

I receive the following:

->Column 'ID' is constrained to be unique. Value '33771' is already present.

Am I missing something?

thank you
Franck
Nov 19 '05 #1
0 688

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: a | last post by:
I've read and split a delimited text file into a dataset. It looks fine in a datagrid (5 columns and 5,000 rows), but I've been trying, without success, to then insert the resulting dataset called...
2
by: a | last post by:
NEW Post Here's my best guess at how to insert this dataset.... the code runs, but no new records are added to the sql table. I've read and split a delimited text file into a dataset. It...
6
by: Pushpendra Vats | last post by:
Hi , I am trying to insert records into database. I am trying to write the following code. On button1 click event i am inserting five records and after that i am calling the update method of...
6
by: Mike Wilson | last post by:
Dear Group, I have a heirarchical set of database tables, say - "order" and "order_type" and want to display a series of orders in a grid control, and in place of the order_type foreign key...
0
by: Peter Newman | last post by:
VB.net ( 2003 ) & SQL 2005 Thank you for all the help in navigating through the dataset using the CurrencyManager. However im now stuck on the next part , Updating, and addind records. how can...
0
by: hzgt9b | last post by:
Using VS2003, VB.NET, Here's some pseudo code that I'm trying to get to work... if <a specific record existsthen do nothing else <insert the specific record> Endif I've got the code...
3
by: Surya | last post by:
Dear All, I have problem on inserting a record to database..Although it looked easy.. i have caught up with following issue .. please go ahead and help me to find solution I Need to insert...
1
by: hanusoft | last post by:
This is an example of Inserting and Retrieving data from xml file. private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here ...
0
by: toyin | last post by:
hello, pls help look through this code its not inserting the record in dataset into the another database. i want to insert the row in the dataset into another table in another database. pls help....
0
by: SL Culby | last post by:
Hello everyone, I have a project where I pull SQL Server data put it into a dataset and now I have to put the dataset data into an Access Database. The dataset currently is over 2000 row, so looping...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.