473,395 Members | 2,467 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,395 software developers and data experts.

BindingNavigator, SQL Embeeded and new records

For whatever reason, I cannot get the simplest database app to work.
This is my environment:
SQL 2008 Standard
SQL Embedded 3.? (Not express)

Sample database table:
table people
peopleID (int, primary key, identity etc)
fullname nvarchar
whatever nvarchar

I then create a new form, drop a bindingnavigator on the form, link it
to the database which generates the dataset, datasource and
dataadaptors.

I then go into the database and add 2 rows manually for content.

I then add two textboxes to the form and via the databinding connect
it to the datasource.

I then add an event for bindingsource item changed (I believe that is
the event), and add an event for onformclose. in both of these methods
I call endEdit to the datasource, and pass the dataset to the
dataadaptor.Update.

When I am running, I can change either of the two rows, and they are
commited to the database, however if I add an extra row, I get a
Concurrency violation: the UpdateCommand affected 0 of the expected 1

I have done nothing fancy, all of the updates work, however I cannot
add new rows and am totally stumped. Googling the concurrency error
only gives info regarding having a database name in the update
statement, which does not exist (and updates work just fine).

Any advise would be appreciated, I am stumped.

Thanks!
Derek
Oct 8 '08 #1
0 968

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

Similar topics

5
by: John | last post by:
Hi When I press the delete button on the BindingNavigator it deletes the record without any warning. How can I add a warning dialog when the delete button on the BindingNavigator is pressed and...
1
by: reidarT | last post by:
I have entered a BindingNavigator toolbar in a bound form and can manage to browse records and I am able to enter data in a new record. I am ot able to save the data and therefore I have entered...
2
by: Dave | last post by:
I have a c# program that uses the bindingnavigator control. It works fine, but I want to add the ability for a user to change his mind after clicking 'delete' to delete a record. So if the user...
3
by: michael sorens | last post by:
I have generated an XmlDocument, then bound it to a DataGridView (thanks to a pointer from PeterBromberg in a separate, recent posting). Now I want to connect a BindingNavigator, but my rudimentary...
0
by: peterlewis | last post by:
Hi, I am unable to delete the current record from bindingnavigator - has a null bindingSource.Current although I can insert new records. The bindingnavigator was added as a control and the data...
7
by: Dale Sampson | last post by:
As you can tell, I am new to VS.net. I have a VB project with a defined data source pointing to a table in a ..mdb file.-- The associated fields are displayed in textboxes using the...
2
by: csharpa | last post by:
Hi, I’m using VS2005 and the bindingnavigator control. Right now I’m using 2 bindingnavigator control (each for one table) in order to generate the new ID when I clicked the ‘add new” button. But...
0
by: Rick | last post by:
VS 2005 I have some custom business objects (BindingList(of T)) connected through BindingSources to a BindingNavigator. When the user moves focus the BindingSource of the navigator can be...
0
by: sincos | last post by:
Hello, First, sorry for my English, I hope you will understand me:) I'm new in using C Sharp and more with the bindingNavigator. What I would do is to simulate the button "add"...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.