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

Updates not made in database

I have a form which loads some database fields on the form that are bounded
to some textboxes. The dataadapter allows for select, update etc. But when I
change the information in the textboxes on the form, it is not updated to the
database. I use the function calls.

sqldataAdapter1.Update(dataset1)

I even tried calling dataset1.AcceptChanges() before and then after the
Update() call, without success.
--
L. A. Jones
Aug 26 '06 #1
2 1248
L.A. Jones,

You can't call AcceptChange before the call to Update, as it will accept
the changes, and the adapter won't see any changes to update.

You might want to check the binding context, and finish the edit on the
current row (the currency manager that you get from the binding context will
allow you to do this). Then, the change should be noted in the dataset, and
the update should work,

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dave" <Da**@discussions.microsoft.comwrote in message
news:F5**********************************@microsof t.com...
>I have a form which loads some database fields on the form that are bounded
to some textboxes. The dataadapter allows for select, update etc. But when
I
change the information in the textboxes on the form, it is not updated to
the
database. I use the function calls.

sqldataAdapter1.Update(dataset1)

I even tried calling dataset1.AcceptChanges() before and then after the
Update() call, without success.
--
L. A. Jones

Aug 26 '06 #2
Ta-naa, it worked, thank you.
--
L. A. Jones
"Nicholas Paldino [.NET/C# MVP]" wrote:
L.A. Jones,

You can't call AcceptChange before the call to Update, as it will accept
the changes, and the adapter won't see any changes to update.

You might want to check the binding context, and finish the edit on the
current row (the currency manager that you get from the binding context will
allow you to do this). Then, the change should be noted in the dataset, and
the update should work,

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dave" <Da**@discussions.microsoft.comwrote in message
news:F5**********************************@microsof t.com...
I have a form which loads some database fields on the form that are bounded
to some textboxes. The dataadapter allows for select, update etc. But when
I
change the information in the textboxes on the form, it is not updated to
the
database. I use the function calls.

sqldataAdapter1.Update(dataset1)

I even tried calling dataset1.AcceptChanges() before and then after the
Update() call, without success.
--
L. A. Jones


Aug 26 '06 #3

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

Similar topics

5
by: Comcast | last post by:
Greetings, I am writing a very simple script that pulls a resultset out of a database. These rows are then made into form variables where the user has the option to update multiple entries, hit...
6
by: Steven An | last post by:
Howdy, I need to write an update query with multiple aggregate functions. Here is an example: UPDATE t SET t.a = ( select avg(f.q) from dbo.foo f where f.p = t.y ), t.b = ( select sum(f.q)...
4
by: T.H.N. | last post by:
I'm trying to work out a database design to make it quicker for my client program to read and display updates to the data set. Currently it reads in the entire data set again after each change,...
0
by: juustagirl | last post by:
There is only one editable field on my datagrid ... a combo box. The data displays correctly. I have a button to make all the changes .... but they are never written back to my Access database....
5
by: Kiki | last post by:
Hello all. Probably I should be sending this to a different group so apologies if this seem out of place. We have an Access db in which people change data - as they do. When they do that, our SQL...
2
by: shumaker | last post by:
I did have a save button for a datagrid that is bound to a tableadapter, but I wanted to remove the button and instead save updates everytime a user finishes editing a row. So I moved the update...
0
by: Etienne | last post by:
Hi, I am settings up my application to work with ClickOnce deployment. However, after instlling installing an update, the database doesn't get copied. I tried everything I could think of. It is...
6
by: McGeeky | last post by:
Hi. GridView's inbuilt capability to edit/update individual rows, one at a time, is useful but inadequate for a scenario we currently face. I want the user to be able to change values in multiple...
2
juve11
by: juve11 | last post by:
hello, i have an app (WICH IS NOT MINE so i dont have source code) installed on 5 computers and a mysql server. this app works with two tables from a mysql database (lets say table_A and table_B)...
0
by: andrewschools | last post by:
Hi, I'm using ClickOnce for all of my installations and updates. However, when I modify any of the datasets in my application, when a user downloads the new update, all their data saved in their...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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.