473,503 Members | 12,791 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dataset update problem

Hi

I have a Windows form that has a number of controls on that are bound to a
dataset. I'm using the code below to save the data back to the database:

connDB.Open()
da.Update(ds, "EQUIPMENT")
connDB.Close()

The problem I have is that if I update a record and move to the next record
then save it works fine, however if I update a record and then click the
save button it does not save the changes. Can anyone tell me how to update
the dataset to see the changes to a record and save them without me having
to move to the next record first.

Hope this makes sense?

Thanks
Rich
Nov 20 '05 #1
4 1384
Rich

probably when I understand you well

Give it a try?

Cor

connDB.Open()
DirectCast(BindingContext(ds.Tables(0)), CurrencyManager).EndCurrentEdit()
da.Update(ds, "EQUIPMENT")
connDB.Close()

Nov 20 '05 #2
Rich

probably when I understand you well

Give it a try?

Cor

connDB.Open()
DirectCast(BindingContext(ds.Tables(0)), CurrencyManager).EndCurrentEdit()
da.Update(ds, "EQUIPMENT")
connDB.Close()

Nov 20 '05 #3
Hi Cor

Yes that works fine now. Thank you

Rich

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:O0*************@TK2MSFTNGP10.phx.gbl...
Rich

probably when I understand you well

Give it a try?

Cor

connDB.Open()


DirectCast(BindingContext(ds.Tables(0)), CurrencyManager).EndCurrentEdit()
da.Update(ds, "EQUIPMENT")
connDB.Close()


Nov 20 '05 #4
Hi Cor

Yes that works fine now. Thank you

Rich

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:O0*************@TK2MSFTNGP10.phx.gbl...
Rich

probably when I understand you well

Give it a try?

Cor

connDB.Open()


DirectCast(BindingContext(ds.Tables(0)), CurrencyManager).EndCurrentEdit()
da.Update(ds, "EQUIPMENT")
connDB.Close()


Nov 20 '05 #5

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

Similar topics

8
749
by: Bruce Stockwell | last post by:
the setup: Webservice/WinClient application/SQL server. VS.Net (visual basic) winform wizard creates a simple form with load cancel cancelall and datagrid bound to a simple Dataset with one...
4
2602
by: Frnak McKenney | last post by:
I'm using an in-core DataSet as an image of my application's 'database' (a multi-table Access97 mdb file). Updates are made to the DataTables within the DataSet via forms with bound TextBoxes,...
2
5243
by: Niyazi | last post by:
Hi, I have not understand the problem. Before all the coding with few application everything worked perfectly. Now I am developing Cheque Writing application and when the cheque is clear the...
7
1845
by: Zachary Hilbun | last post by:
The below is some test code to help me learn how to update a dataset. It is supposed to read the value of UserCounter and write it back. The UserCounter is being read correctly as 0, is 1 when...
15
2226
by: JIM.H. | last post by:
Hello, Can I send a dataset as a parameter into stored procedure and import data to a table in the stored procedure? Thanks, Jim.
4
5066
by: jay | last post by:
I am using the dataset object to add a row to a sql server database in vb.net code, as follows: dim drow as DataRow dim cmdBld as new SqlCommandBuilder(mySqlDataAdapter) ds.tables(0).NewRow()...
14
2103
by: Lars Netzel | last post by:
A little background: I use three Datagrids that are in a child parent relation. I Use Negative Autoincrement on the the DataTables and that's workning nice. My problem is when I Update these...
12
1976
by: Graham Blandford | last post by:
Hi all, Would someone be able to tell me the most 'graceful' way of removing unwanted rows from a dataset based on a condition prior to update? OR, resetting the rows all to unchanged after they...
17
2730
by: A_PK | last post by:
I have problem databinding the DataGrid with DataView/DataSet after the filter... I create the following proceudre in order for user to filter as many as they want, but the following code is only...
4
2222
by: Al | last post by:
I have this scenario: 1. XML file with schema and data is created from SQL Server tables. XML file contains 6 tables, some of them have rows, some of them are empty. 2. XML file is given to the...
0
7212
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
7098
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
5604
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3186
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
405
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.