C Board  

Go Back   C Board > General Programming Boards > C# Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 08-11-2009, 07:02 AM   #1
Registered User
 
Join Date: Jun 2009
Posts: 21
Updating a datarow in a datset

Hi,

I have an existing set of data in SQL which I am referencing as a DataSet object. I want to update some of the fields on one of the rows based on the info that is entered into a form.

I have already set up the form so that it displays the fields of the row in question in a number of text boxes. When you click a check box it allows you to ammend certain fields. This is the information that I want to send back to the database.

Should i be removing the old row and trying to insert the ammendments as new tow (with the same Id) or using a stored proc?

Any ideas welcome.
scott_ill is offline   Reply With Quote
Old 08-30-2009, 10:43 AM   #2
...and never returned.
 
StainedBlue's Avatar
 
Join Date: Aug 2009
Posts: 41
So only one row can be edited at a time? I assume you're not using GridView.
Do you need the DataSet to be updated, and then use the DataSet to update your SqlDb? Or can you just update the SqlDb directly?

There's several ways to go about this type of functionality, but the best approach depends on your requirements. A little more info might help some of us steer you in the best direction.

>>Should i be removing the old row and trying to insert the ammendments as new tow (with the same Id) or using a stored proc?

You can update any cell in the DataSet directly. There's no need to remove and insert new rows.
StainedBlue is offline   Reply With Quote
Old 09-01-2009, 08:50 AM   #3
Registered User
 
Join Date: Jun 2009
Posts: 21
Thanks for the reply.

I sorted this out a while ago. I think I was forgetting to directly reference the correct row in the dataset or something like that.

Anyway it's all working fine now
scott_ill is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WM_Paint not updating using GDI zidsal Windows Programming 3 07-25-2008 05:05 AM
Updating a datarow in dataset osal C# Programming 2 08-08-2005 03:13 PM
file processing updating record error uuser C Programming 2 04-27-2003 12:13 AM
continuously updating timer on console display revelation437 C++ Programming 5 02-24-2003 12:28 PM
Updating a file Unregistered C Programming 1 05-29-2002 03:03 AM


All times are GMT -6. The time now is 07:40 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22