473,513 Members | 3,949 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dataset / DataAdapter Quesiton..!

I'm loading a grid with records from table1. Then I'm changing some of the
records in the grid. What I want to do is load those records into a dataset
or whatever is recommended and then update table1 with the new information.

How can I do this? What's the best way?

Thanks in advacnce...!

Jim
Nov 22 '05 #1
1 1109
In the UpdateCommand event handler of the grid, take the data from the input
fields of the grid and modify the corresponding fields for the correct
corresponding row in the DataSet. Call the DataBind method of the DataGrid
to refresh the grid and then call the Update method of your DataAdapter to
update the original data source.
"jcb1269" <jc*****@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
I'm loading a grid with records from table1. Then I'm changing some of
the
records in the grid. What I want to do is load those records into a
dataset
or whatever is recommended and then update table1 with the new
information.

How can I do this? What's the best way?

Thanks in advacnce...!

Jim

Nov 22 '05 #2

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

Similar topics

1
266
by: jcb1269 | last post by:
I'm loading a grid with records from table1. Then I'm changing some of the records in the grid. What I want to do is load those records into a dataset or whatever is recommended and then update table1 with the new information. How can I do this? What's the best way? Thanks in advacnce...! Jim
2
12655
by: Mojtaba Faridzad | last post by:
Hi, Please check these lines: DataSet dataSet = new DataSet(); dataAdapter.Fill(dataSet, "mytable"); DataRow row; row = dataSet.Tables.Rows; row.BeginEdit(); row = "555";
3
19716
by: JacksonYin | last post by:
1. I can fill data from Excel to DataSet like this: OleDbConnection connection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=../../Book1.xls;Extended Properties=Excel 8.0;"); connection.Open(); OleDbCommand command =new OleDbCommand("SELECT * FROM myRange1", connection);
15
2227
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
2594
by: Dave Taylor | last post by:
I've been using the dataset designer in Visual Studio to create typed datasets for my application by dragging over tables from the Server Explorer and dropping them into the designer. The problem is, when I modify these tables in SQL Server (typically adding fields and what not), there doesnt seem to be an easy way to update the typed...
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 are initally added to the recordset. I create a dataset, which begins empty after the initial .Fill. Then I create several rows with some...
12
7934
by: chreo | last post by:
I GIVE UP...I can't refresh datagrid (dataset) I have datagrid = dgrPaczki Datasource of that datagrid = DataSetPaczki1.PACZKI_PAKOWALNIA (forgive me Polish words) Dataadapter which fills my DataSetPaczki1 = adaPaczki Dataadapter selects rows returned by user defined function = PACZKI_Z_AKCJI To select rows from that function it uses...
4
1425
by: Robert Bravery | last post by:
Hi All, I'm New to VS.net. Trying to figure out this new dataset thingy. Ok so I add a dataadapter with all the correct properties for a table. Then generate the dataset. Now open the dataset and drag another table from the server explorer, set up some relations there. Set up two grids, one a s a parent one as a chgild. Fill the dataset, run...
0
1131
by: davefromalbury | last post by:
I have a gridview connected to a objectdatasource. Can't for the life of me get it to display anything though, always appears empty. The dataset always seems to be filled with records, as the variable "x" always equals the number of records i expected. The business object select command: public static DataSet Select() { DataSet dataSet =...
7
2628
by: David P. Donahue | last post by:
My experience with databases using C# has been pretty limited thus far. Mostly I just use a SELECT statement to populate a DataSet, which is just read-only (mostly for display on a web page), or maybe go so far as to build an UPDATE or INSERT query with a couple parameters and just execute it against the database. Currently, this is all done...
0
7270
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7397
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7563
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7543
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5102
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3252
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3239
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.