473,387 Members | 1,590 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,387 software developers and data experts.

TableAdapter, BindingSource and DataSet - the first record.

Hi,

I have a problem with first record in my table. I put the data to the
table and it's ok, but if I add second row to the table the
first record is updated (and has the same value as the second row). I
use the same code for three tables in my application and it works
without any problem with this one exception. If I have the first item
the another I can add without any problem.
[
Dim drRows As DataRowCollection
Dim objNewRow As DataRow
drRows = VenusDataSet.pdmsap.Rows
objNewRow = VenusDataSet.pdmsap.NewRow()

objNewRow("dok") = RefTextBox.Text
drRows.Add(objNewRow)

Me.PdmsapBindingSource.EndEdit()
Me.PdmsapTableAdapter.Update(Me.VenusDataSet.pdmsa p)
]

BR
Hubert
Jan 21 '08 #1
1 6467
"If I have the first item the another I can add without any problem."
Wanna try that again - I have no idea what you are saying here. It sounds
like you are using the same 'reference' for both the first and second record,
but since you only show the code for adding 1 record, it is hard to say.

--
Terry
"Hubert Wisniewski" wrote:
Hi,

I have a problem with first record in my table. I put the data to the
table and it's ok, but if I add second row to the table the
first record is updated (and has the same value as the second row). I
use the same code for three tables in my application and it works
without any problem with this one exception. If I have the first item
the another I can add without any problem.
[
Dim drRows As DataRowCollection
Dim objNewRow As DataRow
drRows = VenusDataSet.pdmsap.Rows
objNewRow = VenusDataSet.pdmsap.NewRow()

objNewRow("dok") = RefTextBox.Text
drRows.Add(objNewRow)

Me.PdmsapBindingSource.EndEdit()
Me.PdmsapTableAdapter.Update(Me.VenusDataSet.pdmsa p)
]

BR
Hubert
Jan 23 '08 #2

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

Similar topics

0
by: dbuchanan | last post by:
Hello, I have added a query to my TableAdapter that accepts a parameter (The ID) to filter the data. It will return only one record. I tested it in the designer and it returns one record as...
1
by: johnb41 | last post by:
I'm trying to migrate from VS2003 to VS2005. And in the process, there are lots of new things to learn. I am unsure whether to use the "new" way of doing things, or stick with the classic way....
9
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
3
by: Mike | last post by:
Dear Group, When I add a DataTable to a Typed Dataset, and a TableAdapter to the DataTable, I am able to create methods to send updates directly to the database (GenerateDBDirectMethods),...
15
by: philip | last post by:
On a form, I have a datagridview. This datagridview is constructed on a dataset filled by a tableadapter. The table adapter do very well what it must do when filling dataset. Insertions,...
5
by: Rob Dob | last post by:
Hi, I have two c# Winforms. the first form has a datagridview who's datasource is a bindingsource. when you double click on a datagridview row it then opens my second form, which has some...
4
by: shibeta | last post by:
Hello, I have problem with DataGridView and BindingSource. I have created DataSet and added TableData to it with manualy created columns (without DataAdapter - I'm not using MSSQL). On the Form I...
2
by: Rob Dob | last post by:
How do I determine if there are any rows within the BindingSource that have changed prior to calling the EndEdit(). I need to do this in order to archive some records and if I call the EndEdit()...
3
by: =?Utf-8?B?UmljaCBIdXRjaGlucw==?= | last post by:
I'm not really sure how to ask this question because I'm still getting my feet wet with data access and VB.NET, but here goes: To start off with, I'm using VB 2005 Express to connect to an Access...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.