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

save all records with changes

nev
251 100+
i do...

bindingsource.endedit()
tableadapter.update(dataset.datatable)

this is ok but it can only save the current record at a time. i want to make changes to many records and save them all simultaneously.

how can i do that?
Nov 21 '07 #1
5 1143
nev
251 100+
i want to do something like batch update.
Nov 21 '07 #2
Shashi Sadasivan
1,435 Expert 1GB
the update command checks all the rows, and updates them one by one if they have been changed.
So really that does the job.

I generally never let the user manually edit a lot of rows and then expect them to save it. But there are always scenarios where at the back end i have to update a bunch of rows based on what the user instructed.
I have been iterating each row of the datatable, and edit the sutiable ones.
once done i use the update method to update all rows.


So you dont have to really save it each time the user makes a change to a single row
Nov 21 '07 #3
nev
251 100+
the update command checks all the rows, and updates them one by one if they have been changed.
So really that does the job.

I generally never let the user manually edit a lot of rows and then expect them to save it. But there are always scenarios where at the back end i have to update a bunch of rows based on what the user instructed.
I have been iterating each row of the datatable, and edit the sutiable ones.
once done i use the update method to update all rows.


So you dont have to really save it each time the user makes a change to a single row
in my form i have a bound checkbox. let's say for the first two rows, both are unchecked. i go to the 1st record and check it then i go to the next record and check it also. then, i do the update. but when i check the database, only the second record which was the current record gets updated. what may seem to be the problem?
Nov 21 '07 #4
Shashi Sadasivan
1,435 Expert 1GB
Are the checkboxes the values that have to be updated?
or are they in an unbound column which determines if that row has to be updated?
Nov 21 '07 #5
nev
251 100+
Are the checkboxes the values that have to be updated?
or are they in an unbound column which determines if that row has to be updated?
they are bound. i drag n drop it from my datasources pane. before doing so, i changed it first from textbox into checkbox.
Nov 21 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: icedgar | last post by:
am using the following script in the BeforeUpdate area of a main form. Private Sub Form_BeforeUpdate(Cancel As Integer) Dim strMsg As String strMsg = "Do you wish to save your changes?" If...
22
by: Br | last post by:
First issue: When using ADPs you no longer have the ability to issue a me.refresh to save the current record on a form (the me.refresh does a requery in an ADP). We usually do this before...
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
1
by: ankz | last post by:
Hi Guys I have got 3 tables - in Access Database with Student ID as primary Key in all and all tables are linked with 1 to 1 relationship. I have code the everying with manual program to...
1
by: David | last post by:
Hi, I have a continuous form with 'x' amount of records. 1 field on each record is a number, of which I have a field at the top of the form which just shows the running sum. If I enter a new...
4
by: nch1978 | last post by:
I am new to programming and am sorry if this post is in the wrong area. I have a listbox bound to a table and a datagrid bound to another one with a connection through xml. I can change the data...
2
by: rockdc1981 | last post by:
I dont it is possible to put this codes together.. I want to prompt the user to save the record and at the same time have a log of audit trail. the codes work out fine separately. Code for Audit...
2
nev
by: nev | last post by:
I'm trying to learn how to save changes in my BindingSource. What is Me.Validate()? And do I need it everytime I do save the bindingsource? Is this correct? me.validate() '<-- What is this for?...
11
by: gyap88 | last post by:
Hello i m using vb 2005 express to do my project. I m suppose to create a datagrid to allow user to make changes to the database. The program display the database in a datagrid where users can juz...
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
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
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,...
0
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,...

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.